Updated to gcc-2.95.2, from PEACE repository.
http://cvs.kshosen.ac.jp/cvsweb.cgi/peace/pkgsrc/cross/i386-netbsdpe/
This commit is contained in:
parent
e121cd89c7
commit
203e39306f
20 changed files with 1600 additions and 98 deletions
|
@ -1,35 +1,59 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 2000/11/06 03:15:14 minoura Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2001/01/30 03:08:56 minoura Exp $
|
||||
#
|
||||
|
||||
DISTVERSION= 1.0.0.0
|
||||
DISTVERSION= 1.1.2
|
||||
DISTFILES= # none
|
||||
|
||||
MAINTAINER= peace-sacrifice@hauN.ORG
|
||||
HOMEPAGE= http://chiharu.hauN.ORG/peace/
|
||||
MAINTAINER= peace-sacrifice@hauN.org
|
||||
HOMEPAGE= http://chiharu.hauN.org/peace/
|
||||
|
||||
WRKSRC= ${WRKDIR}/${EGCS_DISTNAME}
|
||||
WRKSRC= ${WRKDIR}/${GCC_DISTNAME}
|
||||
|
||||
USE_CROSS_BINUTILS= yes
|
||||
BINUTILS_GNUTARGET= pe-i386
|
||||
BINUTILS_LDEMULATION= i386pe
|
||||
USE_CROSS_EGCS= yes
|
||||
EGCS_FAKE_RUNTIME= yes
|
||||
USE_CROSS_GCC= yes
|
||||
GCC_FAKE_RUNTIME= yes
|
||||
|
||||
TARGET_ARCH= i386-netbsdpe
|
||||
GCC_CONFIGURE_ARGS+= --enable-threads
|
||||
|
||||
BINUTILS_EXTRAS= dlltool windres
|
||||
|
||||
GCC_WIN32_PATCHBUNDLE= ${GCC_DISTNAME}-x86-win32-patches.tar.gz
|
||||
GCC_WIN32_PATCH= ${WRKDIR}/${GCC_DISTNAME}-patches/${GCC_DISTNAME}-x86-win32.diff
|
||||
MASTER_SITES+= ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/${GCC_DISTNAME}/patches/
|
||||
CROSS_DISTFILES+= ${GCC_WIN32_PATCHBUNDLE}
|
||||
|
||||
PTHREAD_DISTNAME= unproven-pthreads-0.17
|
||||
PTHREAD_DISTFILE= ${PTHREAD_DISTNAME}.tar.gz
|
||||
MASTER_SITES+= ftp://ftp.flame.org/pub/netbsd/
|
||||
|
||||
pre-patch: gcc-patchbundle
|
||||
|
||||
gcc-patchbundle:
|
||||
cd ${WRKDIR} && /usr/bin/tar zxf ${_DISTDIR}/${GCC_WIN32_PATCHBUNDLE}
|
||||
${PATCH} -d ${WRKDIR} --forward --quiet -E < ${GCC_WIN32_PATCH}
|
||||
|
||||
post-patch:
|
||||
for i in patches/binutils-*; do \
|
||||
${PATCH} -d ${BINUTILS_WRKSRC} --forward --quiet -E < $$i; \
|
||||
done
|
||||
cd ${BINUTILS_WRKSRC}/bfd && autoconf
|
||||
cd ${BINUTILS_WRKSRC}/gas && autoconf
|
||||
cd ${WRKDIR}/${EGCS_DISTNAME}/gcc && autoconf
|
||||
cd ${WRKDIR}/${GCC_DISTNAME}/gcc && autoconf
|
||||
cd ${WRKDIR} && /usr/bin/tar zxf ${_DISTDIR}/${PTHREAD_DISTFILE}
|
||||
cd ${WRKDIR}/${GCC_DISTNAME}/gcc && \
|
||||
${LN} -s ../../${PTHREAD_DISTNAME}/include/pthread.h . && \
|
||||
${LN} -s ../../${PTHREAD_DISTNAME}/include/pthread .
|
||||
|
||||
|
||||
post-configure:
|
||||
${CP} ${FILESDIR}/i386_limits.h ${SYS_INCLUDE}/machine/limits.h
|
||||
${CP} ${FILESDIR}/syslimits.h ${SYS_INCLUDE}/sys/
|
||||
${CP} ${FILESDIR}/featuretest.h ${SYS_INCLUDE}/sys/
|
||||
${CP} ${FILESDIR}/limits.h ${SYS_INCLUDE}/
|
||||
${RM} ${WRKDIR}/${GCC_DISTNAME}/texinfo/makeinfo/Makefile
|
||||
|
||||
.include "../COMMON/cross.mk"
|
||||
#.include "../COMMON/cross.mk"
|
||||
.include "files/cross.mk"
|
||||
|
|
49
cross/i386-netbsdpe/files/PLIST-gcc
Normal file
49
cross/i386-netbsdpe/files/PLIST-gcc
Normal file
|
@ -0,0 +1,49 @@
|
|||
@comment $NetBSD: PLIST-gcc,v 1.1 2001/01/30 03:08:56 minoura Exp $
|
||||
${TARGET_ARCH}/bin/cc
|
||||
${TARGET_ARCH}/bin/gcc
|
||||
bin/${TARGET_ARCH}-cc
|
||||
bin/${TARGET_ARCH}-gcc
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/cc1
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/collect2
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/cpp
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/README
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/assert.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/exception
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/fixed
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/float.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/iso646.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/limits.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/new
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/new.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/proto.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/stdarg.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/stdbool.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/stddef.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/stdlib.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/syslimits.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/typeinfo
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-alpha.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-arc.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-c4x.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-clipper.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-h8300.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-i860.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-i960.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-m32r.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-m88k.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-mips.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-mn10200.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-mn10300.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-pa.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-ppc.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-pyr.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-sh.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-sparc.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-spur.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/va-v850.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/varargs.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/libgcc.a
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/specs
|
||||
@dirrm lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include
|
||||
@dirrm lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}
|
||||
@dirrm lib/gcc-lib/${TARGET_ARCH}
|
8
cross/i386-netbsdpe/files/PLIST-gcc-cxx
Normal file
8
cross/i386-netbsdpe/files/PLIST-gcc-cxx
Normal file
|
@ -0,0 +1,8 @@
|
|||
@comment $NetBSD: PLIST-gcc-cxx,v 1.1 2001/01/30 03:08:57 minoura Exp $
|
||||
${TARGET_ARCH}/bin/c++
|
||||
${TARGET_ARCH}/bin/c++filt
|
||||
${TARGET_ARCH}/bin/g++
|
||||
bin/${TARGET_ARCH}-c++
|
||||
bin/${TARGET_ARCH}-c++filt
|
||||
bin/${TARGET_ARCH}-g++
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/cc1plus
|
116
cross/i386-netbsdpe/files/PLIST-gcc-cxx-runtime
Normal file
116
cross/i386-netbsdpe/files/PLIST-gcc-cxx-runtime
Normal file
|
@ -0,0 +1,116 @@
|
|||
@comment $NetBSD: PLIST-gcc-cxx-runtime,v 1.1 2001/01/30 03:08:57 minoura Exp $
|
||||
${TARGET_ARCH}/include/g++/algo.h
|
||||
${TARGET_ARCH}/include/g++/algobase.h
|
||||
${TARGET_ARCH}/include/g++/algorithm
|
||||
${TARGET_ARCH}/include/g++/alloc.h
|
||||
${TARGET_ARCH}/include/g++/bvector.h
|
||||
${TARGET_ARCH}/include/g++/cassert
|
||||
${TARGET_ARCH}/include/g++/cctype
|
||||
${TARGET_ARCH}/include/g++/cerrno
|
||||
${TARGET_ARCH}/include/g++/cfloat
|
||||
${TARGET_ARCH}/include/g++/ciso646
|
||||
${TARGET_ARCH}/include/g++/climits
|
||||
${TARGET_ARCH}/include/g++/clocale
|
||||
${TARGET_ARCH}/include/g++/cmath
|
||||
${TARGET_ARCH}/include/g++/complex
|
||||
${TARGET_ARCH}/include/g++/complex.h
|
||||
${TARGET_ARCH}/include/g++/csetjmp
|
||||
${TARGET_ARCH}/include/g++/csignal
|
||||
${TARGET_ARCH}/include/g++/cstdarg
|
||||
${TARGET_ARCH}/include/g++/cstddef
|
||||
${TARGET_ARCH}/include/g++/cstdio
|
||||
${TARGET_ARCH}/include/g++/cstdlib
|
||||
${TARGET_ARCH}/include/g++/cstring
|
||||
${TARGET_ARCH}/include/g++/ctime
|
||||
${TARGET_ARCH}/include/g++/cwchar
|
||||
${TARGET_ARCH}/include/g++/cwctype
|
||||
${TARGET_ARCH}/include/g++/defalloc.h
|
||||
${TARGET_ARCH}/include/g++/deque
|
||||
${TARGET_ARCH}/include/g++/deque.h
|
||||
${TARGET_ARCH}/include/g++/fstream
|
||||
${TARGET_ARCH}/include/g++/function.h
|
||||
${TARGET_ARCH}/include/g++/functional
|
||||
${TARGET_ARCH}/include/g++/hash_map
|
||||
${TARGET_ARCH}/include/g++/hash_map.h
|
||||
${TARGET_ARCH}/include/g++/hash_set
|
||||
${TARGET_ARCH}/include/g++/hash_set.h
|
||||
${TARGET_ARCH}/include/g++/hashtable.h
|
||||
${TARGET_ARCH}/include/g++/heap.h
|
||||
${TARGET_ARCH}/include/g++/iomanip
|
||||
${TARGET_ARCH}/include/g++/iosfwd
|
||||
${TARGET_ARCH}/include/g++/iostream
|
||||
${TARGET_ARCH}/include/g++/iterator
|
||||
${TARGET_ARCH}/include/g++/iterator.h
|
||||
${TARGET_ARCH}/include/g++/list
|
||||
${TARGET_ARCH}/include/g++/list.h
|
||||
${TARGET_ARCH}/include/g++/map
|
||||
${TARGET_ARCH}/include/g++/map.h
|
||||
${TARGET_ARCH}/include/g++/memory
|
||||
${TARGET_ARCH}/include/g++/multimap.h
|
||||
${TARGET_ARCH}/include/g++/multiset.h
|
||||
${TARGET_ARCH}/include/g++/numeric
|
||||
${TARGET_ARCH}/include/g++/pair.h
|
||||
${TARGET_ARCH}/include/g++/pthread_alloc
|
||||
${TARGET_ARCH}/include/g++/pthread_alloc.h
|
||||
${TARGET_ARCH}/include/g++/queue
|
||||
${TARGET_ARCH}/include/g++/rope
|
||||
${TARGET_ARCH}/include/g++/rope.h
|
||||
${TARGET_ARCH}/include/g++/ropeimpl.h
|
||||
${TARGET_ARCH}/include/g++/set
|
||||
${TARGET_ARCH}/include/g++/set.h
|
||||
${TARGET_ARCH}/include/g++/slist
|
||||
${TARGET_ARCH}/include/g++/slist.h
|
||||
${TARGET_ARCH}/include/g++/stack
|
||||
${TARGET_ARCH}/include/g++/stack.h
|
||||
${TARGET_ARCH}/include/g++/std/bastring.cc
|
||||
${TARGET_ARCH}/include/g++/std/bastring.h
|
||||
${TARGET_ARCH}/include/g++/std/complext.cc
|
||||
${TARGET_ARCH}/include/g++/std/complext.h
|
||||
${TARGET_ARCH}/include/g++/std/dcomplex.h
|
||||
${TARGET_ARCH}/include/g++/std/fcomplex.h
|
||||
${TARGET_ARCH}/include/g++/std/ldcomplex.h
|
||||
${TARGET_ARCH}/include/g++/std/straits.h
|
||||
${TARGET_ARCH}/include/g++/stdexcept
|
||||
${TARGET_ARCH}/include/g++/stl.h
|
||||
${TARGET_ARCH}/include/g++/stl_algo.h
|
||||
${TARGET_ARCH}/include/g++/stl_algobase.h
|
||||
${TARGET_ARCH}/include/g++/stl_alloc.h
|
||||
${TARGET_ARCH}/include/g++/stl_bvector.h
|
||||
${TARGET_ARCH}/include/g++/stl_config.h
|
||||
${TARGET_ARCH}/include/g++/stl_construct.h
|
||||
${TARGET_ARCH}/include/g++/stl_deque.h
|
||||
${TARGET_ARCH}/include/g++/stl_function.h
|
||||
${TARGET_ARCH}/include/g++/stl_hash_fun.h
|
||||
${TARGET_ARCH}/include/g++/stl_hash_map.h
|
||||
${TARGET_ARCH}/include/g++/stl_hash_set.h
|
||||
${TARGET_ARCH}/include/g++/stl_hashtable.h
|
||||
${TARGET_ARCH}/include/g++/stl_heap.h
|
||||
${TARGET_ARCH}/include/g++/stl_iterator.h
|
||||
${TARGET_ARCH}/include/g++/stl_list.h
|
||||
${TARGET_ARCH}/include/g++/stl_map.h
|
||||
${TARGET_ARCH}/include/g++/stl_multimap.h
|
||||
${TARGET_ARCH}/include/g++/stl_multiset.h
|
||||
${TARGET_ARCH}/include/g++/stl_numeric.h
|
||||
${TARGET_ARCH}/include/g++/stl_pair.h
|
||||
${TARGET_ARCH}/include/g++/stl_queue.h
|
||||
${TARGET_ARCH}/include/g++/stl_raw_storage_iter.h
|
||||
${TARGET_ARCH}/include/g++/stl_relops.h
|
||||
${TARGET_ARCH}/include/g++/stl_rope.h
|
||||
${TARGET_ARCH}/include/g++/stl_set.h
|
||||
${TARGET_ARCH}/include/g++/stl_slist.h
|
||||
${TARGET_ARCH}/include/g++/stl_stack.h
|
||||
${TARGET_ARCH}/include/g++/stl_tempbuf.h
|
||||
${TARGET_ARCH}/include/g++/stl_tree.h
|
||||
${TARGET_ARCH}/include/g++/stl_uninitialized.h
|
||||
${TARGET_ARCH}/include/g++/stl_vector.h
|
||||
${TARGET_ARCH}/include/g++/string
|
||||
${TARGET_ARCH}/include/g++/strstream
|
||||
${TARGET_ARCH}/include/g++/tempbuf.h
|
||||
${TARGET_ARCH}/include/g++/tree.h
|
||||
${TARGET_ARCH}/include/g++/type_traits.h
|
||||
${TARGET_ARCH}/include/g++/utility
|
||||
${TARGET_ARCH}/include/g++/vector
|
||||
${TARGET_ARCH}/include/g++/vector.h
|
||||
${TARGET_ARCH}/lib/libstdc++.a
|
||||
@dirrm ${TARGET_ARCH}/include/g++/std
|
||||
@dirrm ${TARGET_ARCH}/include/g++
|
8
cross/i386-netbsdpe/files/PLIST-gcc-f77
Normal file
8
cross/i386-netbsdpe/files/PLIST-gcc-f77
Normal file
|
@ -0,0 +1,8 @@
|
|||
@comment $NetBSD: PLIST-gcc-f77,v 1.1 2001/01/30 03:08:57 minoura Exp $
|
||||
${TARGET_ARCH}/bin/f77
|
||||
${TARGET_ARCH}/bin/fort77
|
||||
${TARGET_ARCH}/bin/g77
|
||||
bin/${TARGET_ARCH}-f77
|
||||
bin/${TARGET_ARCH}-fort77
|
||||
bin/${TARGET_ARCH}-g77
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/f771
|
3
cross/i386-netbsdpe/files/PLIST-gcc-f77-runtime
Normal file
3
cross/i386-netbsdpe/files/PLIST-gcc-f77-runtime
Normal file
|
@ -0,0 +1,3 @@
|
|||
@comment $NetBSD: PLIST-gcc-f77-runtime,v 1.1 2001/01/30 03:08:57 minoura Exp $
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/g2c.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/libg2c.a
|
13
cross/i386-netbsdpe/files/PLIST-gcc-objc-runtime
Normal file
13
cross/i386-netbsdpe/files/PLIST-gcc-objc-runtime
Normal file
|
@ -0,0 +1,13 @@
|
|||
@comment $NetBSD: PLIST-gcc-objc-runtime,v 1.1 2001/01/30 03:08:58 minoura Exp $
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/NXConstStr.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/Object.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/Protocol.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/encoding.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/hash.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/objc-api.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/objc-list.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/objc.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/sarray.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/thr.h
|
||||
lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc/typedstream.h
|
||||
@dirrm lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}/include/objc
|
278
cross/i386-netbsdpe/files/cross.mk
Normal file
278
cross/i386-netbsdpe/files/cross.mk
Normal file
|
@ -0,0 +1,278 @@
|
|||
# $PEACE: cross.mk,v 1.1 2001/01/16 15:20:26 kent Exp $
|
||||
# NetBSD: cross.mk,v 1.16 2000/11/09 13:04:55 wiz Exp
|
||||
|
||||
# Shared definitions for building a cross-compile environment.
|
||||
|
||||
DISTNAME= cross-${TARGET_ARCH}-${DISTVERSION}
|
||||
CATEGORIES+= cross lang
|
||||
USE_CROSSBASE= yes
|
||||
PLIST_SRC= ${WRKDIR}/.PLIST_SRC
|
||||
|
||||
HOMEPAGE?= http://gcc.gnu.org/
|
||||
|
||||
TARGET_DIR= ${PREFIX}/${TARGET_ARCH}
|
||||
COMMON_DIR= ${PKGSRCDIR}/cross/COMMON
|
||||
GCC_PLIST_DIR= files
|
||||
PLIST_PRE?= ${PKGDIR}/PLIST
|
||||
|
||||
pre-install: pre-install-dirs
|
||||
pre-install-dirs:
|
||||
${INSTALL_DATA_DIR} ${PREFIX}
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/bin
|
||||
${INSTALL_DATA_DIR} ${PREFIX}/lib
|
||||
${INSTALL_DATA_DIR} ${TARGET_DIR}
|
||||
${INSTALL_DATA_DIR} ${TARGET_DIR}/bin
|
||||
${INSTALL_DATA_DIR} ${TARGET_DIR}/include
|
||||
${INSTALL_DATA_DIR} ${TARGET_DIR}/lib
|
||||
|
||||
.if defined(USE_CROSS_BINUTILS)
|
||||
BINUTILS_DISTNAME= binutils-2.9.1
|
||||
BINUTILS_WRKSRC= ${WRKDIR}/${BINUTILS_DISTNAME}
|
||||
|
||||
CROSS_DISTFILES+= ${BINUTILS_DISTNAME}.tar.gz
|
||||
MASTER_SITES+= ${MASTER_SITE_GNU:=binutils/}
|
||||
CONFIGURE_ARGS+= --with-gnu-as --with-gnu-ld
|
||||
DEPENDS+= cross-binutils-2.9.1.1:../../cross/binutils
|
||||
PLIST_PRE+= ${COMMON_DIR}/PLIST-binutils
|
||||
|
||||
AS_FOR_TARGET= ${BINUTILS_WRKSRC}/gas/as-new
|
||||
AR_FOR_TARGET= ${WRKDIR}/ar
|
||||
NM_FOR_TARGET= ${WRKDIR}/nm
|
||||
RANLIB_FOR_TARGET= ${WRKDIR}/ranlib
|
||||
LD_FOR_TARGET= ${WRKDIR}/ld
|
||||
|
||||
pre-patch: binutils-patch
|
||||
pre-configure: binutils-configure
|
||||
do-build: binutils-build
|
||||
do-install: binutils-install
|
||||
|
||||
binutils-patch:
|
||||
@for i in ${COMMON_DIR}/patches-binutils/patch-*; do \
|
||||
${PATCH} -d ${BINUTILS_WRKSRC} --forward --quiet -E < $$i; \
|
||||
done
|
||||
|
||||
BFD64ARG= --enable-64-bit-bfd
|
||||
|
||||
binutils-configure:
|
||||
@cd ${BINUTILS_WRKSRC} && ${SETENV} CC="${CC}" ac_cv_path_CC="${CC}" \
|
||||
CFLAGS="${CFLAGS}" ${CONFIGURE_ENV} ./configure \
|
||||
--prefix=${PREFIX} --host=${MACHINE_GNU_ARCH}--netbsd \
|
||||
--target=${TARGET_ARCH} ${BFD64ARG}
|
||||
|
||||
binutils-build:
|
||||
@cd ${BINUTILS_WRKSRC}/bfd && ${SETENV} ${MAKE_ENV} \
|
||||
${MAKE_PROGRAM} ${MAKE_FLAGS} bfd.h
|
||||
@cd ${BINUTILS_WRKSRC}/libiberty && ${SETENV} ${MAKE_ENV} \
|
||||
${MAKE_PROGRAM} ${MAKE_FLAGS} all
|
||||
@cd ${BINUTILS_WRKSRC}/gas && ${SETENV} ${MAKE_ENV} \
|
||||
${MAKE_PROGRAM} ${MAKE_FLAGS} as-new
|
||||
${TEST} -x ${WRKDIR}/ar || ${LINK.c} -o ${WRKDIR}/ar \
|
||||
-DPREFIX=\"${PREFIX}\" \
|
||||
-DGNUTARGET=\"${BINUTILS_GNUTARGET}\" \
|
||||
${COMMON_DIR}/buwrapper.c
|
||||
@cd ${WRKDIR} && \
|
||||
${LN} -f ar nm && \
|
||||
${LN} -f ar ranlib
|
||||
${TEST} -x ${WRKDIR}/ld || ${LINK.c} -o ${WRKDIR}/ld \
|
||||
-DPREFIX=\"${PREFIX}\" \
|
||||
-DGNUTARGET=\"${BINUTILS_GNUTARGET}\" \
|
||||
-DLDEMULATION=\"${BINUTILS_LDEMULATION}\" \
|
||||
-DLD_RPATH_LINK=\"${TARGET_DIR}/lib\" \
|
||||
${COMMON_DIR}/buwrapper.c
|
||||
|
||||
binutils-install:
|
||||
${INSTALL_PROGRAM} ${BINUTILS_WRKSRC}/gas/as-new ${TARGET_DIR}/bin/as
|
||||
${INSTALL_PROGRAM} ${WRKDIR}/ar ${TARGET_DIR}/bin/ar
|
||||
${INSTALL_PROGRAM} ${WRKDIR}/ld ${TARGET_DIR}/bin/ld
|
||||
for i in addr2line nm objcopy objdump ranlib size strings strip ${BINUTILS_EXTRAS}; do \
|
||||
${LN} -f ${TARGET_DIR}/bin/ar ${TARGET_DIR}/bin/$$i; \
|
||||
done
|
||||
for i in addr2line ar as ld nm objcopy objdump ranlib size strings strip ${BINUTILS_EXTRAS}; do \
|
||||
${LN} -f ${TARGET_DIR}/bin/$$i ${PREFIX}/bin/${TARGET_ARCH}-$$i; \
|
||||
done
|
||||
.endif
|
||||
|
||||
.if defined(USE_CROSS_GCC)
|
||||
GCC_DISTNAME= gcc-2.95.2
|
||||
#EGCS_DISTDIR= releases/${EGCS_DISTNAME}
|
||||
GCC_INTVERSION= 2.95.2
|
||||
#EGCS_PATCHBUNDLE= ${EGCS_DISTNAME}-NetBSD-19980104.diff.gz
|
||||
GCC_WRKSRC= ${WRKDIR}/${GCC_DISTNAME}
|
||||
GCC_LANGUAGES= c # add to these below
|
||||
BUILD_DEPENDS+= autoheader:../../devel/autoconf
|
||||
|
||||
.if defined(GCC_NO_RUNTIME) || defined(GCC_FAKE_RUNTIME)
|
||||
GCC_NO_CXX_RUNTIME= yes
|
||||
GCC_NO_F77_RUNTIME= yes
|
||||
GCC_NO_OBJC_RUNTIME= yes
|
||||
.endif
|
||||
|
||||
.if !defined(GCC_NO_CXX)
|
||||
CXX_CONFIGURE_ARGS+= --with-gxx-include-dir=${TARGET_DIR}/include/g++
|
||||
GCC_LANGUAGES+= c++
|
||||
PLIST_PRE+= ${GCC_PLIST_DIR}/PLIST-gcc-cxx
|
||||
.if !defined(GCC_NO_CXX_RUNTIME)
|
||||
PLIST_PRE+= ${GCC_PLIST_DIR}/PLIST-gcc-cxx-runtime
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if !defined(GCC_NO_F77)
|
||||
GCC_LANGUAGES+= f77
|
||||
PLIST_PRE+= ${GCC_PLIST_DIR}/PLIST-gcc-f77
|
||||
.if !defined(GCC_NO_F77_RUNTIME)
|
||||
PLIST_PRE+= ${GCC_PLIST_DIR}/PLIST-gcc-f77-runtime
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if !defined(GCC_NO_OBJC)
|
||||
GCC_LANGUAGES+= objc
|
||||
PLIST_PRE+= ${GCC_PLIST_DIR}/PLIST-gcc-objc
|
||||
.if !defined(GCC_NO_OBJC_RUNTIME)
|
||||
PLIST_PRE+= ${GCC_PLIST_DIR}/PLIST-gcc-objc-runtime
|
||||
.endif
|
||||
.endif
|
||||
|
||||
# the main PLIST needs to go last to get the @dirrm's right
|
||||
PLIST_PRE+= ${GCC_PLIST_DIR}/PLIST-gcc
|
||||
CROSS_DISTFILES+= ${GCC_DISTNAME}.tar.gz #${EGCS_PATCHBUNDLE}
|
||||
#MASTER_SITES+= ftp://egcs.cygnus.com/pub/egcs/${EGCS_DISTDIR}/ \
|
||||
# ${MASTER_SITE_LOCAL}
|
||||
USE_GMAKE= yes
|
||||
|
||||
CC_FOR_TARGET= ${GCC_WRKSRC}/gcc/xgcc -B${GCC_WRKSRC}/gcc/ ${CFLAGS_FOR_TARGET}
|
||||
CXX_FOR_TARGET= ${CC_FOR_TARGET}
|
||||
|
||||
GCC_MAKE_FLAGS= CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
|
||||
CC_FOR_TARGET="${CC_FOR_TARGET}" \
|
||||
GCC_FOR_TARGET="${CC_FOR_TARGET}" \
|
||||
CXX_FOR_TARGET="${CXX_FOR_TARGET}" \
|
||||
AS_FOR_TARGET="${AS_FOR_TARGET}" \
|
||||
AR_FOR_TARGET="${AR_FOR_TARGET}" \
|
||||
NM_FOR_TARGET="${NM_FOR_TARGET}" \
|
||||
RANLIB_FOR_TARGET="${RANLIB_FOR_TARGET}" \
|
||||
LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET}" \
|
||||
LANGUAGES="${GCC_LANGUAGES}" \
|
||||
INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \
|
||||
INSTALL_PROGRAM="${INSTALL_PROGRAM}"
|
||||
GCC_MAKE= ${SETENV} ${MAKE_ENV} \
|
||||
${MAKE_PROGRAM} ${MAKE_FLAGS} ${GCC_MAKE_FLAGS}
|
||||
|
||||
.if defined(GCC_FAKE_RUNTIME)
|
||||
SYS_INCLUDE= ${WRKDIR}/include
|
||||
.endif
|
||||
.if defined(SYS_INCLUDE)
|
||||
CFLAGS_FOR_TARGET+= -idirafter ${SYS_INCLUDE}
|
||||
GCC_MAKE_FLAGS+= SYSTEM_HEADER_DIR="${SYS_INCLUDE}"
|
||||
.endif
|
||||
.if defined(SYS_LIB)
|
||||
LDFLAGS_FOR_TARGET+= -L${SYS_LIB}
|
||||
.endif
|
||||
|
||||
#pre-patch: gcc-patch
|
||||
pre-configure: gcc-configure
|
||||
do-build: gcc-build
|
||||
do-install: gcc-install
|
||||
|
||||
#gcc-patch:
|
||||
# @${GZCAT} ${_DISTDIR}/${EGCS_PATCHBUNDLE} | \
|
||||
# ${PATCH} -d ${EGCS_WRKSRC} --forward --quiet -E
|
||||
# @for i in ${COMMON_DIR}/patches-egcs/patch-*; do \
|
||||
# ${PATCH} -d ${EGCS_WRKSRC} --forward --quiet -E < $$i; \
|
||||
# done
|
||||
|
||||
gcc-configure:
|
||||
@cd ${GCC_WRKSRC} && ${SETENV} CC="${CC}" ac_cv_path_CC="${CC}" \
|
||||
CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" \
|
||||
INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \
|
||||
INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
|
||||
./configure --prefix=${PREFIX} \
|
||||
--host=${MACHINE_GNU_ARCH}--netbsd --target=${TARGET_ARCH} \
|
||||
${GCC_CONFIGURE_ARGS} ${CXX_CONFIGURE_ARGS}
|
||||
.if defined(GCC_FAKE_RUNTIME)
|
||||
@${MKDIR} ${SYS_INCLUDE} ${SYS_INCLUDE}/machine ${SYS_INCLUDE}/sys
|
||||
@cd ${SYS_INCLUDE} && ${TOUCH} ${TOUCH_FLAGS} machine/ansi.h \
|
||||
sys/time.h stdlib.h unistd.h
|
||||
.endif
|
||||
|
||||
gcc-build:
|
||||
@${LN} -sf ${AS_FOR_TARGET} ${GCC_WRKSRC}/gcc/as
|
||||
@${LN} -sf ${LD_FOR_TARGET} ${GCC_WRKSRC}/gcc/ld
|
||||
@cd ${GCC_WRKSRC} && make all-libiberty
|
||||
@cd ${GCC_WRKSRC}/gcc && ${GCC_MAKE} all
|
||||
.if !defined(GCC_NO_CXX) && !defined(GCC_NO_CXX_RUNTIME)
|
||||
@cd ${GCC_WRKSRC} && ${GCC_MAKE} configure-target-libio configure-target-libstdc++ all-target-libio all-target-libstdc++
|
||||
.endif
|
||||
.if !defined(GCC_NO_F77) && !defined(GCC_NO_F77_RUNTIME)
|
||||
@cd ${GCC_WRKSRC} && ${GCC_MAKE} configure-target-libf2c all-target-libf2c
|
||||
.endif
|
||||
.if !defined(GCC_NO_OBJC) && !defined(GCC_NO_OBJC_RUNTIME)
|
||||
@cd ${GCC_WRKSRC}/gcc && ${GCC_MAKE} objc-runtime
|
||||
.endif
|
||||
|
||||
gcc-install:
|
||||
@cd ${GCC_WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} \
|
||||
${MAKE_PROGRAM} ${MAKE_FLAGS} ${GCC_MAKE_FLAGS} \
|
||||
install-common install-headers install-libgcc install-driver
|
||||
${CHOWN} -R ${BINOWN}:${BINGRP} ${PREFIX}/lib/gcc-lib/${TARGET_ARCH}/${GCC_INTVERSION}
|
||||
${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-gcc ${PREFIX}/bin/${TARGET_ARCH}-cc
|
||||
${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-gcc ${TARGET_DIR}/bin/cc
|
||||
${RM} ${PREFIX}/bin/${TARGET_ARCH}-gcj # install-driver installs gcj but we need not it
|
||||
.if !defined(GCC_NO_F77)
|
||||
.if !defined(GCC_NO_F77_RUNTIME)
|
||||
@cd ${GCC_WRKSRC} && ${GCC_MAKE} install-target-libf2c
|
||||
.endif
|
||||
${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-g77 ${PREFIX}/bin/${TARGET_ARCH}-f77
|
||||
${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-g77 ${PREFIX}/bin/${TARGET_ARCH}-fort77
|
||||
for file in f77 fort77 g77; do \
|
||||
${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-$$file ${TARGET_DIR}/bin/$$file; \
|
||||
done
|
||||
.endif
|
||||
.if !defined(GCC_NO_CXX)
|
||||
.if !defined(GCC_NO_CXX_RUNTIME)
|
||||
@${MKDIR} ${TARGET_DIR}/include/g++/std
|
||||
@cd ${GCC_WRKSRC} && ${GCC_MAKE} install-target-libstdc++
|
||||
.endif
|
||||
for file in c++ c++filt g++; do \
|
||||
${LN} -f ${PREFIX}/bin/${TARGET_ARCH}-$$file ${TARGET_DIR}/bin/$$file; \
|
||||
done
|
||||
.endif
|
||||
@${RMDIR} -p ${PREFIX}/info 2>/dev/null || ${TRUE}
|
||||
@${RMDIR} -p ${PREFIX}/man/man1 2>/dev/null || ${TRUE}
|
||||
.endif
|
||||
|
||||
.if defined(CROSS_DISTFILES)
|
||||
DISTFILES+= ${CROSS_DISTFILES}
|
||||
.if defined(EXTRACT_ONLY)
|
||||
EXTRACT_ONLY+= ${CROSS_DISTFILES:N*.diff.gz}
|
||||
.else
|
||||
EXTRACT_ONLY= ${DISTFILES:N*.diff.gz}
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if defined(SYS_INCLUDE) && !defined(GCC_FAKE_RUNTIME)
|
||||
pre-install: pre-install-includes
|
||||
pre-install-includes:
|
||||
cd ${SYS_INCLUDE} && ${PAX} -rw . ${TARGET_DIR}/include
|
||||
.endif
|
||||
|
||||
.if defined(SYS_LIB)
|
||||
pre-install: pre-install-lib
|
||||
pre-install-lib:
|
||||
cd ${SYS_LIB} && ${PAX} -rw . ${TARGET_DIR}/lib
|
||||
.endif
|
||||
|
||||
post-install: post-install-plist
|
||||
post-install-plist:
|
||||
@${SED} -e 's|$${TARGET_ARCH}|${TARGET_ARCH}|' \
|
||||
-e 's|$${GCC_INTVERSION}|${GCC_INTVERSION}|' \
|
||||
${PLIST_PRE} >${PLIST_SRC}
|
||||
@${ECHO} '@dirrm ${TARGET_ARCH}/bin' >>${PLIST_SRC}
|
||||
@${ECHO} '@exec mkdir -p ${TARGET_ARCH}/include' >>${PLIST_SRC}
|
||||
@${ECHO} '@dirrm ${TARGET_ARCH}/include' >>${PLIST_SRC}
|
||||
@${ECHO} '@exec mkdir -p ${TARGET_ARCH}/lib' >>${PLIST_SRC}
|
||||
@${ECHO} '@dirrm ${TARGET_ARCH}/lib' >>${PLIST_SRC}
|
||||
@${ECHO} '@dirrm ${TARGET_ARCH}' >>${PLIST_SRC}
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
||||
EXTRACT_BEFORE_ARGS:= -X ${COMMON_DIR}/exclude ${EXTRACT_BEFORE_ARGS}
|
|
@ -1,5 +1,5 @@
|
|||
$NetBSD: md5,v 1.1.1.1 2000/11/06 03:15:14 minoura Exp $
|
||||
$NetBSD: md5,v 1.2 2001/01/30 03:08:58 minoura Exp $
|
||||
|
||||
MD5 (gcc-2.95.2-x86-win32-patches.tar.gz) = d7a4cf0082a222bd4ee780fb6ef94b82
|
||||
MD5 (binutils-2.9.1.tar.gz) = 8f9ad1a6e96742fd3069479171a63c22
|
||||
MD5 (egcs-1.1.1.tar.gz) = 0b3f0e856dcbb2241c183081fc7271af
|
||||
MD5 (egcs-1.1.1-NetBSD-19980104.diff.gz) = 8c4d952d999ead62f6604948c65c2454
|
||||
MD5 (gcc-2.95.2.tar.gz) = 0e36957d734286e242e9697fd2806c4f
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
$NetBSD: patch-sum,v 1.1.1.1 2000/11/06 03:15:14 minoura Exp $
|
||||
$NetBSD: patch-sum,v 1.2 2001/01/30 03:08:58 minoura Exp $
|
||||
|
||||
MD5 (patch-ae) = 99d80e024658acdf2b0644bad1cb2fac
|
||||
MD5 (patch-af) = e9dd99401b0213988988da696c3b5825
|
||||
MD5 (patch-ag) = 13027c5cf5d30e8342396a1f70b803f8
|
||||
MD5 (patch-aa) = 714fd58bf57f5528bb7767847a2e3ed8
|
||||
MD5 (patch-co) = 1d4eea39503b20d1c5c94e3d95426bfe
|
||||
MD5 (patch-cp) = 3ba4994d246553ed6115e99c22693932
|
||||
MD5 (patch-cq) = 782b6f7159e7212a22094fea9e93ed80
|
||||
MD5 (patch-ma) = ff7dd6b557381fca5161bc87dd2a8751
|
||||
MD5 (patch-pe) = d4b784a815cf090540e8550c74925a58
|
||||
|
|
763
cross/i386-netbsdpe/patches/patch-aa
Normal file
763
cross/i386-netbsdpe/patches/patch-aa
Normal file
|
@ -0,0 +1,763 @@
|
|||
$NetBSD: patch-aa,v 1.1 2001/01/30 03:08:59 minoura Exp $
|
||||
|
||||
diff -urN gcc-2.95.2/gcc/collect2.c gcc-patched/gcc/collect2.c
|
||||
--- gcc/collect2.c Wed Oct 13 06:16:52 1999
|
||||
+++ gcc/collect2.c Thu Dec 14 20:00:19 2000
|
||||
@@ -53,7 +53,6 @@
|
||||
#define obstack_chunk_alloc xmalloc
|
||||
#define obstack_chunk_free free
|
||||
|
||||
-extern char *make_temp_file PROTO ((char *));
|
||||
|
||||
/* On certain systems, we have code that works by scanning the object file
|
||||
directly. But this code uses system-specific header files and library
|
||||
diff -urN gcc-2.95.2/gcc/config/elfos.h gcc-patched/gcc/config/elfos.h
|
||||
--- gcc/config/elfos.h Fri Mar 26 19:45:26 1999
|
||||
+++ gcc/config/elfos.h Thu Dec 14 20:00:19 2000
|
||||
@@ -48,6 +48,7 @@
|
||||
|
||||
/* Output #ident as a .ident. */
|
||||
|
||||
+#undef ASM_OUTPUT_IDENT
|
||||
#define ASM_OUTPUT_IDENT(FILE, NAME) \
|
||||
fprintf (FILE, "\t%s\t\"%s\"\n", IDENT_ASM_OP, NAME);
|
||||
|
||||
@@ -92,6 +93,10 @@
|
||||
#undef SET_ASM_OP
|
||||
#define SET_ASM_OP ".set"
|
||||
|
||||
+/* We want local labels to start with period if made with asm_fprintf. */
|
||||
+#undef LOCAL_LABEL_PREFIX
|
||||
+#define LOCAL_LABEL_PREFIX "."
|
||||
+
|
||||
/* This is how to begin an assembly language file. Most svr4 assemblers want
|
||||
at least a .file directive to come first, and some want to see a .version
|
||||
directive come right after that. Here we just establish a default
|
||||
@@ -130,7 +135,7 @@
|
||||
#undef ASM_OUTPUT_INTERNAL_LABEL
|
||||
#define ASM_OUTPUT_INTERNAL_LABEL(FILE, PREFIX, NUM) \
|
||||
do { \
|
||||
- fprintf (FILE, ".%s%d:\n", PREFIX, NUM); \
|
||||
+ fprintf (FILE, "%s%s%d:\n", LOCAL_LABEL_PREFIX, PREFIX, NUM); \
|
||||
} while (0)
|
||||
|
||||
/* This is how to store into the string LABEL
|
||||
@@ -144,7 +149,7 @@
|
||||
#undef ASM_GENERATE_INTERNAL_LABEL
|
||||
#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
|
||||
do { \
|
||||
- sprintf (LABEL, "*.%s%d", PREFIX, NUM); \
|
||||
+ sprintf (LABEL, "*%s%s%d", LOCAL_LABEL_PREFIX, PREFIX, NUM); \
|
||||
} while (0)
|
||||
|
||||
/* Output the label which precedes a jumptable. Note that for all svr4
|
||||
@@ -461,6 +466,7 @@
|
||||
|
||||
/* This is how we tell the assembler that a symbol is weak. */
|
||||
|
||||
+#undef ASM_WEAKEN_LABEL
|
||||
#define ASM_WEAKEN_LABEL(FILE,NAME) \
|
||||
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
|
||||
fputc ('\n', FILE); } while (0)
|
||||
diff -urN gcc-2.95.2/gcc/config/i386/netbsd-elf.h gcc-patched/gcc/config/i386/netbsd-elf.h
|
||||
--- gcc/config/i386/netbsd-elf.h Thu Jan 1 09:00:00 1970
|
||||
+++ gcc/config/i386/netbsd-elf.h Thu Dec 14 20:00:18 2000
|
||||
@@ -0,0 +1,161 @@
|
||||
+/* Definitions of target machine for GNU compiler,
|
||||
+ for i386 NetBSD systems.
|
||||
+ Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 2, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
+
|
||||
+/* This is used on i386 platforms that use the ELF format.
|
||||
+ This was taken from the NetBSD/alpha configuration, and modified
|
||||
+ for NetBSD/i386 by Christos Zoulas <christos@netbsd.org> */
|
||||
+
|
||||
+/* Get generic i386 definitions. */
|
||||
+
|
||||
+/* This goes away when the math-emulator is fixed */
|
||||
+#define TARGET_CPU_DEFAULT 0400 /* TARGET_NO_FANCY_MATH_387 */
|
||||
+
|
||||
+#include <i386/gstabs.h>
|
||||
+
|
||||
+/* Get perform_* macros to build libgcc.a. */
|
||||
+#include <i386/perform.h>
|
||||
+
|
||||
+/* Get generic NetBSD ELF definitions. We will override these if necessary. */
|
||||
+
|
||||
+#define NETBSD_ELF
|
||||
+#include <netbsd.h>
|
||||
+
|
||||
+#undef ASM_FINAL_SPEC
|
||||
+
|
||||
+/* Names to predefine in the preprocessor for this target machine. */
|
||||
+
|
||||
+#undef CPP_PREDEFINES
|
||||
+#define CPP_PREDEFINES "\
|
||||
+-Dunix -Di386 -D__NetBSD__ -D__ELF__ \
|
||||
+-Asystem(unix) -Asystem(NetBSD) -Acpu(i386) -Amachine(i386)"
|
||||
+
|
||||
+/* Make gcc agree with <machine/ansi.h> */
|
||||
+
|
||||
+#undef SIZE_TYPE
|
||||
+#define SIZE_TYPE "unsigned int"
|
||||
+
|
||||
+#undef PTRDIFF_TYPE
|
||||
+#define PTRDIFF_TYPE "int"
|
||||
+
|
||||
+#undef WCHAR_TYPE
|
||||
+#define WCHAR_TYPE "int"
|
||||
+
|
||||
+#undef WCHAR_UNSIGNED
|
||||
+#define WCHAR_UNSIGNED 0
|
||||
+
|
||||
+#undef WCHAR_TYPE_SIZE
|
||||
+#define WCHAR_TYPE_SIZE 32
|
||||
+
|
||||
+/* Output assembler code to FILE to increment profiler label # LABELNO
|
||||
+ for profiling a function entry. Under NetBSD/i386, the assembler does
|
||||
+ nothing special with -pg. */
|
||||
+
|
||||
+#undef ASM_APP_ON
|
||||
+#define ASM_APP_ON "#APP\n"
|
||||
+
|
||||
+#undef ASM_APP_OFF
|
||||
+#define ASM_APP_OFF "#NO_APP\n"
|
||||
+
|
||||
+#define bsd4_4
|
||||
+#undef HAS_INIT_SECTION
|
||||
+
|
||||
+/* Provide a LINK_SPEC appropriate for a NetBSD/alpha ELF target. Only
|
||||
+ the linker emulation is i386-specific. The rest are
|
||||
+ common to all ELF targets, except for the name of the start function. */
|
||||
+
|
||||
+#undef LINK_SPEC
|
||||
+#define LINK_SPEC \
|
||||
+ "-m elf_i386 \
|
||||
+ %{assert*} %{R*} \
|
||||
+ %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ -dc -dp \
|
||||
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
|
||||
+ %{static:-static}}"
|
||||
+
|
||||
+#undef DEFAULT_VTABLE_THUNKS
|
||||
+#define DEFAULT_VTABLE_THUNKS 1
|
||||
+
|
||||
+#undef ASM_OUTPUT_ALIGN
|
||||
+#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
||||
+ if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1 << (LOG))
|
||||
+
|
||||
+/* This is how we tell the assembler that two symbols have the same value. */
|
||||
+
|
||||
+#define ASM_OUTPUT_DEF(FILE,NAME1,NAME2) \
|
||||
+ do { assemble_name(FILE, NAME1); \
|
||||
+ fputs(" = ", FILE); \
|
||||
+ assemble_name(FILE, NAME2); \
|
||||
+ fputc('\n', FILE); } while (0)
|
||||
+
|
||||
+/*
|
||||
+ * We always use gas here, so we don't worry about ECOFF assembler problems.
|
||||
+ */
|
||||
+#undef TARGET_GAS
|
||||
+#define TARGET_GAS (1)
|
||||
+
|
||||
+/* The following macros are stolen from i386v4.h */
|
||||
+/* These have to be defined to get PIC code correct */
|
||||
+
|
||||
+/* This is how to output an element of a case-vector that is relative.
|
||||
+ This is only used for PIC code. See comments by the `casesi' insn in
|
||||
+ i386.md for an explanation of the expression this outputs. */
|
||||
+
|
||||
+#undef ASM_OUTPUT_ADDR_DIFF_ELT
|
||||
+#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
|
||||
+ fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE)
|
||||
+
|
||||
+/* Indicate that jump tables go in the text section. This is
|
||||
+ necessary when compiling PIC code. */
|
||||
+
|
||||
+#define JUMP_TABLES_IN_TEXT_SECTION 1
|
||||
+
|
||||
+/* Default to pcc-struct-return, because this is the ELF abi and
|
||||
+ we don't care about compatibility with older gcc versions. */
|
||||
+#define DEFAULT_PCC_STRUCT_RETURN 1
|
||||
+
|
||||
+/* Profiling routines, partially copied from i386/osfrose.h. */
|
||||
+
|
||||
+/* Redefine this to use %eax instead of %edx. */
|
||||
+#undef FUNCTION_PROFILER
|
||||
+#define FUNCTION_PROFILER(FILE, LABELNO) \
|
||||
+{ \
|
||||
+ if (flag_pic) \
|
||||
+ { \
|
||||
+ fprintf (FILE, "\tcall __mcount@PLT\n"); \
|
||||
+ } \
|
||||
+ else \
|
||||
+ { \
|
||||
+ fprintf (FILE, "\tcall __mcount\n"); \
|
||||
+ } \
|
||||
+}
|
||||
+
|
||||
+/* Put relocations in the constant pool in the writable data section. */
|
||||
+#undef SELECT_RTX_SECTION
|
||||
+#define SELECT_RTX_SECTION(MODE,RTX) \
|
||||
+{ \
|
||||
+ if (flag_pic && symbolic_operand (RTX)) \
|
||||
+ data_section (); \
|
||||
+ else \
|
||||
+ readonly_data_section (); \
|
||||
+}
|
||||
diff -urN gcc-2.95.2/gcc/config/i386/xm-netbsd.h gcc-patched/gcc/config/i386/xm-netbsd.h
|
||||
--- gcc/config/i386/xm-netbsd.h Thu Jan 1 09:00:00 1970
|
||||
+++ gcc/config/i386/xm-netbsd.h Thu Dec 14 20:00:18 2000
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* Configuration file for i386 hosts running NetBSD.
|
||||
+ Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 2, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+#include <xm-netbsd.h>
|
||||
+#include <i386/xm-i386.h>
|
||||
+
|
||||
diff -urN gcc-2.95.2/gcc/config/netbsd.h gcc-patched/gcc/config/netbsd.h
|
||||
--- gcc/config/netbsd.h Thu Dec 17 05:59:58 1998
|
||||
+++ gcc/config/netbsd.h Thu Dec 14 20:00:19 2000
|
||||
@@ -48,17 +48,31 @@
|
||||
#define ASM_SPEC " %| %{fpic:-k} %{fPIC:-k -K}"
|
||||
|
||||
/* Provide a LIB_SPEC appropriate for NetBSD. Just select the appropriate
|
||||
- libc, depending on whether we're doing profiling. */
|
||||
+ libc, depending on whether we're doing profiling; if `-posix' is specified,
|
||||
+ link against the appropriate libposix first. */
|
||||
|
||||
#undef LIB_SPEC
|
||||
-#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
|
||||
+#define LIB_SPEC \
|
||||
+ "%{posix:%{!p:%{!pg:-lposix}}%{p:-lposix_p}%{pg:-lposix_p}} \
|
||||
+ %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
|
||||
+
|
||||
+/* #ifdef NETBSD_AOUT */
|
||||
+
|
||||
+/* Provide a STARTFILE_SPEC appropriate for NetBSD a.out. Here we
|
||||
+ provide support for the special GCC option -static. */
|
||||
+
|
||||
+#undef STARTFILE_SPEC
|
||||
+#define STARTFILE_SPEC \
|
||||
+ "%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:%{!static:crt0%O%s}%{static:scrt0%O%s}}}} %{shared:c++rt0%O%s}"
|
||||
|
||||
/* Provide a LINK_SPEC appropriate for NetBSD. Here we provide support
|
||||
for the special GCC options -static, -assert, and -nostdlib. */
|
||||
|
||||
#undef LINK_SPEC
|
||||
#define LINK_SPEC \
|
||||
- "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
|
||||
+ "%{nostdlib:-nostdlib} %{!shared:%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic}} %{shared:-Bshareable} %{R*} %{assert*}"
|
||||
+
|
||||
+/* #endif NETBSD_AOUT */
|
||||
|
||||
/* This defines which switch letters take arguments. */
|
||||
#undef SWITCH_TAKES_ARG
|
||||
@@ -127,6 +141,9 @@
|
||||
entries in an ELF object file under SVR4. These macros also output
|
||||
the starting labels for the relevant functions/objects. */
|
||||
|
||||
+/* XXX. This is WRONG for alpha. Needs to be verified on other ELF ports. */
|
||||
+#ifndef NETBSD_ELF
|
||||
+
|
||||
/* Write the extra assembler code needed to declare a function properly.
|
||||
Some svr4 assemblers need to also have something extra said about the
|
||||
function's return value. We allow for that here. */
|
||||
@@ -207,3 +224,54 @@
|
||||
putc ('\n', FILE); \
|
||||
} \
|
||||
} while (0)
|
||||
+
|
||||
+#endif /* ! NETBSD_ELF */
|
||||
+
|
||||
+/* NetBSD ELF support begins here. */
|
||||
+
|
||||
+#ifdef NETBSD_ELF
|
||||
+
|
||||
+/* Start with generic ELF definitions. */
|
||||
+#include "elfos.h"
|
||||
+
|
||||
+#undef DWARF_DEBUGGING_INFO /* XXX */
|
||||
+#undef DWARF2_DEBUGGING_INFO /* XXX */
|
||||
+
|
||||
+/* Provide a STARTFILE_SPEC appropriate for NetBSD ELF targets. Here we
|
||||
+ provide support for the special GCC option -static. On ELF targets,
|
||||
+ we also add the crtbegin.o file which provides part of the support
|
||||
+ for getting C++ file-scope static objects constructed before entering
|
||||
+ `main'. */
|
||||
+
|
||||
+#undef STARTFILE_SPEC
|
||||
+#define STARTFILE_SPEC \
|
||||
+ "%{!shared: \
|
||||
+ %{pg:gcrt0%O%s} \
|
||||
+ %{!pg: \
|
||||
+ %{p:gcrt0%O%s} \
|
||||
+ %{!p:crt0%O%s}}} \
|
||||
+ %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}"
|
||||
+
|
||||
+/* Provide an ENDFILE_SPEC appropriate for NetBSD ELF targets. Here we
|
||||
+ add crtend.o, which provides part of the support for getting C++
|
||||
+ file-scope static objects deconstructed after exiting `main'. */
|
||||
+
|
||||
+#undef ENDFILE_SPEC
|
||||
+#define ENDFILE_SPEC \
|
||||
+ "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
|
||||
+
|
||||
+/* Provide a LINK_SPEC appropriate for a NetBSD ELF target. */
|
||||
+
|
||||
+#undef LINK_SPEC
|
||||
+#define LINK_SPEC \
|
||||
+ "%{assert*} \
|
||||
+ %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ -dc -dp \
|
||||
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
|
||||
+ %{static:-static}}"
|
||||
+
|
||||
+#endif /* NETBSD_ELF */
|
||||
diff -urN gcc-2.95.2/gcc/config/sparc/netbsd-elf.h gcc-patched/gcc/config/sparc/netbsd-elf.h
|
||||
--- gcc/config/sparc/netbsd-elf.h Thu Jan 1 09:00:00 1970
|
||||
+++ gcc/config/sparc/netbsd-elf.h Thu Dec 14 20:00:18 2000
|
||||
@@ -0,0 +1,42 @@
|
||||
+/* NetBSD/sparc ELF configuration */
|
||||
+
|
||||
+/*
|
||||
+ * Pull in generic SPARC ELF configuration, and then clean up
|
||||
+ * afterwards
|
||||
+ */
|
||||
+#include <sparc/elf.h>
|
||||
+
|
||||
+/* Name the target CPU. */
|
||||
+#ifndef TARGET_CPU_DEFAULT
|
||||
+#define TARGET_CPU_DEFAULT TARGET_CPU_sparc
|
||||
+#endif
|
||||
+
|
||||
+#undef MULDI3_LIBCALL
|
||||
+#undef DIVDI3_LIBCALL
|
||||
+#undef UDIVDI3_LIBCALL
|
||||
+#undef MODDI3_LIBCALL
|
||||
+#undef UMODDI3_LIBCALL
|
||||
+#undef INIT_SUBTARGET_OPTABS
|
||||
+#define INIT_SUBTARGET_OPTABS
|
||||
+
|
||||
+#undef CPP_SUBTARGET_SPEC
|
||||
+#define CPP_SUBTARGET_SPEC "-D__sparc"
|
||||
+
|
||||
+#include <sparc/netbsd-elf-common.h>
|
||||
+
|
||||
+#undef LINK_SPEC
|
||||
+#define LINK_SPEC \
|
||||
+ "-m elf32_sparc \
|
||||
+ %{assert*} %{R*} \
|
||||
+ %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ -dy -dc -dp \
|
||||
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
|
||||
+ %{static:-static}}"
|
||||
+
|
||||
+/* Name the port. */
|
||||
+#undef TARGET_NAME
|
||||
+#define TARGET_NAME "sparc-netbsdelf"
|
||||
diff -urN gcc-2.95.2/gcc/config/sparc/netbsd64.h gcc-patched/gcc/config/sparc/netbsd64.h
|
||||
--- gcc/config/sparc/netbsd64.h Thu Jan 1 09:00:00 1970
|
||||
+++ gcc/config/sparc/netbsd64.h Thu Dec 14 20:00:18 2000
|
||||
@@ -0,0 +1,169 @@
|
||||
+/* NetBSD/sparc64 ELF configuration */
|
||||
+
|
||||
+/*
|
||||
+ * Pull in generic SPARC64 ELF configuration, and then clean up
|
||||
+ * afterwards
|
||||
+ */
|
||||
+
|
||||
+/* Let us output 32 bit code as well */
|
||||
+#define SPARC_BI_ARCH
|
||||
+
|
||||
+/* Name the target CPU. This must be before <sparc/sparc.h>. */
|
||||
+#ifndef TARGET_CPU_DEFAULT
|
||||
+#define TARGET_CPU_DEFAULT TARGET_CPU_ultrasparc
|
||||
+#endif
|
||||
+
|
||||
+#include <sparc/sp64-elf.h>
|
||||
+
|
||||
+#include <sparc/netbsd-elf-common.h>
|
||||
+
|
||||
+#undef CPP_SUBTARGET_SPEC
|
||||
+#define CPP_SUBTARGET_SPEC "-D__sparc64__"
|
||||
+
|
||||
+#undef LINK_SPEC64
|
||||
+#define LINK_SPEC64 \
|
||||
+ "-m elf64_sparc \
|
||||
+ %{assert*} %{R*} \
|
||||
+ %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ -dy -dc -dp \
|
||||
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
|
||||
+ %{static:-static}}"
|
||||
+
|
||||
+#undef LINK_SPEC
|
||||
+#define LINK_SPEC LINK_SPEC64
|
||||
+
|
||||
+#ifdef SPARC_BI_ARCH
|
||||
+
|
||||
+#undef STARTFILE_SPEC64
|
||||
+#define STARTFILE_SPEC64 \
|
||||
+ "%{!shared: \
|
||||
+ %{pg:gcrt0%O%s} \
|
||||
+ %{!pg: \
|
||||
+ %{p:gcrt0%O%s} \
|
||||
+ %{!p:crt0%O%s}}} \
|
||||
+ %{!shared:crtbegin%O%s} %{shared:crtbeginS%O%s}"
|
||||
+
|
||||
+#undef STARTFILE_SPEC32
|
||||
+#define STARTFILE_SPEC32 \
|
||||
+ "%{!shared: \
|
||||
+ %{pg:/emul/netbsd32/usr/lib/gcrt0%O%s} \
|
||||
+ %{!pg: \
|
||||
+ %{p:/emul/netbsd32/usr/lib/gcrt0%O%s} \
|
||||
+ %{!p:/emul/netbsd32/usr/lib/crt0%O%s}}} \
|
||||
+ %{!shared:/emul/netbsd32/usr/lib/crtbegin%O%s} %{shared:/emul/netbsd32/usr/lib/crtbeginS%O%s}"
|
||||
+
|
||||
+#undef STARTFILE_SPEC
|
||||
+#if DEFAULT_ARCH32_P
|
||||
+#define STARTFILE_SPEC "\
|
||||
+%{m32:" STARTFILE_SPEC32 "} \
|
||||
+%{m64:" STARTFILE_SPEC64 "} \
|
||||
+%{!m32:%{!m64:" STARTFILE_SPEC32 "}}"
|
||||
+#else
|
||||
+#define STARTFILE_SPEC "\
|
||||
+%{m32:" STARTFILE_SPEC32 "} \
|
||||
+%{m64:" STARTFILE_SPEC64 "} \
|
||||
+%{!m32:%{!m64:" STARTFILE_SPEC64 "}}"
|
||||
+#endif
|
||||
+
|
||||
+#undef ENDFILE_SPEC64
|
||||
+#define ENDFILE_SPEC64 \
|
||||
+ "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
|
||||
+
|
||||
+#undef ENDFILE_SPEC32
|
||||
+#define ENDFILE_SPEC32 \
|
||||
+ "%{!shared:/emul/netbsd32/usr/lib/crtend%O%s} %{shared:/emul/netbsd32/usr/lib/crtendS%O%s}"
|
||||
+
|
||||
+#undef ENDFILE_SPEC
|
||||
+#if DEFAULT_ARCH32_P
|
||||
+#define ENDFILE_SPEC "\
|
||||
+%{m32:" ENDFILE_SPEC32 "} \
|
||||
+%{m64:" ENDFILE_SPEC64 "} \
|
||||
+%{!m32:%{!m64:" ENDFILE_SPEC32 "}}"
|
||||
+#else
|
||||
+#define ENDFILE_SPEC "\
|
||||
+%{m32:" ENDFILE_SPEC32 "} \
|
||||
+%{m64:" ENDFILE_SPEC64 "} \
|
||||
+%{!m32:%{!m64:" ENDFILE_SPEC64 "}}"
|
||||
+#endif
|
||||
+
|
||||
+#undef SUBTARGET_EXTRA_SPECS
|
||||
+#define SUBTARGET_EXTRA_SPECS \
|
||||
+ { "link_arch32", LINK_ARCH32_SPEC }, \
|
||||
+ { "link_arch64", LINK_ARCH64_SPEC }, \
|
||||
+ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
|
||||
+ { "link_arch", LINK_ARCH_SPEC },
|
||||
+
|
||||
+#undef LINK_ARCH32_SPEC
|
||||
+#define LINK_ARCH32_SPEC \
|
||||
+ "-m elf32_sparc \
|
||||
+ -Y P,/emul/netbsd32/usr/lib \
|
||||
+ %{assert*} %{R*} \
|
||||
+ %{shared:-shared} \
|
||||
+ %{!shared: \
|
||||
+ -dy -dc -dp \
|
||||
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
|
||||
+ %{!static: \
|
||||
+ %{rdynamic:-export-dynamic} \
|
||||
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
|
||||
+ %{static:-static}}"
|
||||
+
|
||||
+#undef LINK_ARCH64_SPEC
|
||||
+#define LINK_ARCH64_SPEC LINK_SPEC64
|
||||
+
|
||||
+#define LINK_ARCH_SPEC "\
|
||||
+%{m32:%(link_arch32)} \
|
||||
+%{m64:%(link_arch64)} \
|
||||
+%{!m32:%{!m64:%(link_arch_default)}} \
|
||||
+"
|
||||
+
|
||||
+#define LINK_ARCH_DEFAULT_SPEC \
|
||||
+(DEFAULT_ARCH32_P ? LINK_ARCH32_SPEC : LINK_ARCH64_SPEC)
|
||||
+
|
||||
+#undef LINK_SPEC
|
||||
+#define LINK_SPEC "\
|
||||
+%(link_arch) \
|
||||
+%{mlittle-endian:-EL} \
|
||||
+"
|
||||
+
|
||||
+#undef CC1_SPEC
|
||||
+#if DEFAULT_ARCH32_P
|
||||
+#define CC1_SPEC "\
|
||||
+%{sun4:} %{target:} \
|
||||
+%{mcypress:-mcpu=cypress} \
|
||||
+%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
|
||||
+%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
|
||||
+%{m64:-mptr64 -mcpu=ultrasparc -mstack-bias} \
|
||||
+"
|
||||
+#else
|
||||
+#define CC1_SPEC "\
|
||||
+%{sun4:} %{target:} \
|
||||
+%{mcypress:-mcpu=cypress} \
|
||||
+%{msparclite:-mcpu=sparclite} %{mf930:-mcpu=f930} %{mf934:-mcpu=f934} \
|
||||
+%{mv8:-mcpu=v8} %{msupersparc:-mcpu=supersparc} \
|
||||
+%{m32:-mptr32 -mcpu=cypress -mno-stack-bias} \
|
||||
+"
|
||||
+#endif
|
||||
+
|
||||
+#if DEFAULT_ARCH32_P
|
||||
+#define MULTILIB_DEFAULTS { "m32" }
|
||||
+#else
|
||||
+#define MULTILIB_DEFAULTS { "m64" }
|
||||
+#endif
|
||||
+
|
||||
+#undef CPP_SUBTARGET_SPEC
|
||||
+#define CPP_SUBTARGET_SPEC \
|
||||
+(DEFAULT_ARCH32_P ? "\
|
||||
+%{m64:-D__sparc64__}%{!m64:-D__sparc} \
|
||||
+" : "\
|
||||
+%{!m32:-D__sparc64__}%{m32:-D__sparc} \
|
||||
+")
|
||||
+
|
||||
+#endif /* SPARC_BI_ARCH */
|
||||
+
|
||||
+/* Name the port. */
|
||||
+#undef TARGET_NAME
|
||||
+#define TARGET_NAME "sparc64-netbsd"
|
||||
diff -urN gcc-2.95.2/gcc/config/sparc/sparc.md gcc-patched/gcc/config/sparc/sparc.md
|
||||
--- gcc/config/sparc/sparc.md Thu Oct 21 14:35:40 1999
|
||||
+++ gcc/config/sparc/sparc.md Thu Dec 14 20:00:18 2000
|
||||
@@ -3472,10 +3472,7 @@
|
||||
(define_split
|
||||
[(set (match_operand:TF 0 "register_operand" "")
|
||||
(match_operand:TF 1 "register_operand" ""))]
|
||||
- "reload_completed
|
||||
- && (! TARGET_ARCH64
|
||||
- || (TARGET_FPU
|
||||
- && ! TARGET_HARD_QUAD))"
|
||||
+ "reload_completed"
|
||||
[(clobber (const_int 0))]
|
||||
"
|
||||
{
|
||||
diff -urN gcc-2.95.2/gcc/config/sparc/sysv4.h gcc-patched/gcc/config/sparc/sysv4.h
|
||||
--- gcc/config/sparc/sysv4.h Tue Jun 22 02:48:53 1999
|
||||
+++ gcc/config/sparc/sysv4.h Thu Dec 14 20:00:19 2000
|
||||
@@ -210,6 +210,29 @@
|
||||
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
|
||||
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
|
||||
|
||||
+/* A C statement (sans semicolon) to output an element in the table of
|
||||
+ global constructors. */
|
||||
+#undef ASM_OUTPUT_CONSTRUCTOR
|
||||
+#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
|
||||
+ do { \
|
||||
+ ctors_section (); \
|
||||
+ fprintf (FILE, "\t%s\t ", TARGET_ARCH64 ? ASM_LONGLONG : INT_ASM_OP); \
|
||||
+ assemble_name (FILE, NAME); \
|
||||
+ fprintf (FILE, "\n"); \
|
||||
+ } while (0)
|
||||
+
|
||||
+/* A C statement (sans semicolon) to output an element in the table of
|
||||
+ global destructors. */
|
||||
+#undef ASM_OUTPUT_DESTRUCTOR
|
||||
+#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
|
||||
+ do { \
|
||||
+ dtors_section (); \
|
||||
+ fprintf (FILE, "\t%s\t ", TARGET_ARCH64 ? ASM_LONGLONG : INT_ASM_OP); \
|
||||
+ assemble_name (FILE, NAME); \
|
||||
+ fprintf (FILE, "\n"); \
|
||||
+ } while (0)
|
||||
+
|
||||
+
|
||||
/* Override the name of the mcount profiling function. */
|
||||
|
||||
#undef MCOUNT_FUNCTION
|
||||
diff -urN gcc-2.95.2/gcc/config/sparc/xm-netbsd.h gcc-patched/gcc/config/sparc/xm-netbsd.h
|
||||
--- gcc/config/sparc/xm-netbsd.h Thu Jan 1 09:00:00 1970
|
||||
+++ gcc/config/sparc/xm-netbsd.h Thu Dec 14 20:00:19 2000
|
||||
@@ -0,0 +1,4 @@
|
||||
+/* Configuration for GCC for Sun SPARC running NetBSD as host. */
|
||||
+
|
||||
+#include <sparc/xm-sparc.h>
|
||||
+#include <xm-netbsd.h>
|
||||
diff -urN gcc-2.95.2/gcc/config/sparc/xm-netbsd64.h gcc-patched/gcc/config/sparc/xm-netbsd64.h
|
||||
--- gcc/config/sparc/xm-netbsd64.h Thu Jan 1 09:00:00 1970
|
||||
+++ gcc/config/sparc/xm-netbsd64.h Thu Dec 14 20:00:19 2000
|
||||
@@ -0,0 +1,4 @@
|
||||
+/* Configuration for GCC for Sun SPARC V9 running NetBSD as host. */
|
||||
+
|
||||
+#include <xm-netbsd.h>
|
||||
+#include <sparc/xm-sp64.h>
|
||||
diff -urN gcc-2.95.2/gcc/config/xm-netbsd.h gcc-patched/gcc/config/xm-netbsd.h
|
||||
--- gcc/config/xm-netbsd.h Thu Jan 1 09:00:00 1970
|
||||
+++ gcc/config/xm-netbsd.h Thu Dec 14 20:00:19 2000
|
||||
@@ -0,0 +1,32 @@
|
||||
+/* Configuration for GNU C-compiler for hosts running NetBSD.
|
||||
+ Copyright (C) 1995 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
+GNU CC is free software; you can redistribute it and/or modify
|
||||
+it under the terms of the GNU General Public License as published by
|
||||
+the Free Software Foundation; either version 2, or (at your option)
|
||||
+any later version.
|
||||
+
|
||||
+GNU CC is distributed in the hope that it will be useful,
|
||||
+but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+You should have received a copy of the GNU General Public License
|
||||
+along with GNU CC; see the file COPYING. If not, write to
|
||||
+the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
+Boston, MA 02111-1307, USA. */
|
||||
+
|
||||
+/* This file defines machine-independent things specific to a host
|
||||
+ running NetBSD. This file should not be specified as $xm_file itself;
|
||||
+ instead $xm_file should be CPU/xm-netbsd.h, which should include both
|
||||
+ CPU/xm-CPU.h and this file xm-netbsd.h. */
|
||||
+
|
||||
+#undef POSIX
|
||||
+#define POSIX
|
||||
+
|
||||
+/* Ensure we get gnu C's defaults. */
|
||||
+#ifdef __GNUC__
|
||||
+#define alloca __builtin_alloca
|
||||
+#endif
|
||||
diff -urN gcc-2.95.2/gcc/config/xm-target64.h gcc-patched/gcc/config/xm-target64.h
|
||||
--- gcc/config/xm-target64.h Thu Jan 1 09:00:00 1970
|
||||
+++ gcc/config/xm-target64.h Thu Dec 14 20:00:19 2000
|
||||
@@ -0,0 +1,6 @@
|
||||
+/* Hack to extend HOST_WIDE_INT on 64-bit target cross compilers. */
|
||||
+
|
||||
+#ifdef __GNUC__
|
||||
+#define HOST_WIDE_INT long long
|
||||
+#define HOST_BITS_PER_WIDE_INT 64
|
||||
+#endif
|
||||
diff -urN gcc-2.95.2/gcc/emit-rtl.c gcc-patched/gcc/emit-rtl.c
|
||||
--- gcc/emit-rtl.c Wed Aug 11 16:28:52 1999
|
||||
+++ gcc/emit-rtl.c Thu Dec 14 20:00:20 2000
|
||||
@@ -1378,6 +1378,15 @@
|
||||
val = ((val & 0xffffffff) ^ 0x80000000) - 0x80000000;
|
||||
return GEN_INT (val);
|
||||
}
|
||||
+#if HOST_BITS_PER_WIDE_INT >= 64
|
||||
+ else if (BITS_PER_WORD >= 64 && i <= 1)
|
||||
+ {
|
||||
+ val = k[i*2 + ! WORDS_BIG_ENDIAN];
|
||||
+ val = (((val & 0xffffffff) ^ 0x80000000) - 0x80000000) << 32;
|
||||
+ val |= (HOST_WIDE_INT) k[i*2 + WORDS_BIG_ENDIAN] & 0xffffffff;
|
||||
+ return GEN_INT (val);
|
||||
+ }
|
||||
+#endif
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
diff -urN gcc-2.95.2/gcc/ginclude/stddef.h gcc-patched/gcc/ginclude/stddef.h
|
||||
--- gcc/ginclude/stddef.h Thu Dec 17 06:19:25 1998
|
||||
+++ gcc/ginclude/stddef.h Thu Dec 14 20:00:20 2000
|
||||
@@ -45,6 +45,12 @@
|
||||
#define _WCHAR_T
|
||||
#endif
|
||||
#endif
|
||||
+/* On NetBSD, machine/ansi.h defines _BSD_WINT_T_ instead of _WINT_T. */
|
||||
+#if !defined(_WINT_T_) && !defined(_BSD_WINT_T_)
|
||||
+#ifndef _BSD_WINT_T_
|
||||
+#define _WINT_T
|
||||
+#endif
|
||||
+#endif
|
||||
/* Undef _FOO_T_ if we are supposed to define foo_t. */
|
||||
#if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
|
||||
#undef _PTRDIFF_T_
|
||||
@@ -58,6 +64,10 @@
|
||||
#undef _WCHAR_T_
|
||||
#undef _BSD_WCHAR_T_
|
||||
#endif
|
||||
+#if defined (__need_wint_t) || defined (_STDDEF_H_)
|
||||
+#undef _WINT_T_
|
||||
+#undef _BSD_WINT_T_
|
||||
+#endif
|
||||
#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */
|
||||
|
||||
/* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
|
||||
@@ -272,12 +282,14 @@
|
||||
|
||||
#if defined (_STDDEF_H) || defined (__need_wint_t)
|
||||
#ifndef _WINT_T
|
||||
+#ifndef _BSD_WINT_T_
|
||||
#define _WINT_T
|
||||
|
||||
#ifndef __WINT_TYPE__
|
||||
#define __WINT_TYPE__ unsigned int
|
||||
#endif
|
||||
typedef __WINT_TYPE__ wint_t;
|
||||
+#endif
|
||||
#endif
|
||||
#undef __need_wint_t
|
||||
#endif
|
||||
diff -urN gcc-2.95.2/gcc/objc/objc-act.c gcc-patched/gcc/objc/objc-act.c
|
||||
--- gcc/objc/objc-act.c Thu Apr 15 05:28:54 1999
|
||||
+++ gcc/objc/objc-act.c Thu Dec 14 20:00:19 2000
|
||||
@@ -8399,8 +8399,11 @@
|
||||
pushdecl (decl);
|
||||
rest_of_decl_compilation (decl, 0, 0, 0);
|
||||
|
||||
- /* Make following constant read-only (why not)? */
|
||||
- readonly_data_section ();
|
||||
+ /* Make following constant read-only, if not compiling PIC. */
|
||||
+ if (flag_pic)
|
||||
+ data_section();
|
||||
+ else
|
||||
+ readonly_data_section ();
|
||||
|
||||
exp = build1 (ADDR_EXPR, string_type_node, decl);
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
$NetBSD: patch-ae,v 1.1.1.1 2000/11/06 03:15:15 minoura Exp $
|
||||
|
||||
--- gcc/config.sub.dist Sun Oct 1 07:57:03 2000
|
||||
+++ gcc/config.sub Sun Oct 1 07:57:51 2000
|
||||
@@ -732,7 +732,7 @@
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
- | -mingw32* | -linux-gnu* | -uxpv* | -beos* )
|
||||
+ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -netbsdpe* )
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-linux*)
|
|
@ -1,23 +0,0 @@
|
|||
$NetBSD: patch-af,v 1.1.1.1 2000/11/06 03:15:15 minoura Exp $
|
||||
|
||||
--- gcc/configure.in.dist Sun Oct 1 07:58:07 2000
|
||||
+++ gcc/configure.in Sun Oct 1 08:36:41 2000
|
||||
@@ -869,6 +869,18 @@
|
||||
fixincludes=fixinc.wrap
|
||||
tmake_file=t-netbsd
|
||||
;;
|
||||
+ i[[34567]]86-*-netbsdpe* )
|
||||
+ xm_file="${xm_file} i386/xm-cygwin32.h"
|
||||
+ tmake_file=i386/t-cygwin32
|
||||
+ tm_file=i386/netbsd-pe.h
|
||||
+ xmake_file=i386/x-cygwin32
|
||||
+ extra_objs=winnt.o
|
||||
+ fixincludes=Makefile.in
|
||||
+ if [[ x$enable_threads = xyes ]]; then
|
||||
+ thread_file='win32'
|
||||
+ fi
|
||||
+ exeext=.exe
|
||||
+ ;;
|
||||
i[[34567]]86-*-netbsd*)
|
||||
tm_file=i386/netbsd.h
|
||||
xm_file=i386/xm-netbsd.h
|
78
cross/i386-netbsdpe/patches/patch-co
Normal file
78
cross/i386-netbsdpe/patches/patch-co
Normal file
|
@ -0,0 +1,78 @@
|
|||
$NetBSD: patch-co,v 1.1 2001/01/30 03:09:00 minoura Exp $
|
||||
|
||||
--- gcc/configure.in.pre-patch Tue Jan 16 21:47:25 2001
|
||||
+++ gcc/configure.in
|
||||
@@ -1156,9 +1156,34 @@
|
||||
tmake_file=t-freebsd
|
||||
;;
|
||||
changequote(,)dnl
|
||||
+ i[34567]86-*-netbsdelf* | \
|
||||
+ i[34567]86-*-netbsd1.4[I-Z]* | \
|
||||
+ i[34567]86-*-netbsd1.[5-9]* | \
|
||||
+ i[34567]86-*-netbsd2*)
|
||||
+changequote([,])dnl
|
||||
+ tm_file=i386/netbsd-elf.h
|
||||
+ xm_file=i386/xm-netbsd.h
|
||||
+ tmake_file=t-netbsd
|
||||
+ ;;
|
||||
+changequote(,)dnl
|
||||
+ i[34567]86-*-netbsdpe* )
|
||||
+changequote([,])dnl
|
||||
+ xm_file="${xm_file} i386/xm-cygwin.h"
|
||||
+ tmake_file=i386/t-cygwin
|
||||
+ tm_file=i386/netbsd-pe.h
|
||||
+ xmake_file=i386/x-cygwin
|
||||
+ extra_objs=winnt.o
|
||||
+ fixincludes=Makefile.in
|
||||
+ if [[ x$enable_threads = xyes ]]; then
|
||||
+ thread_file='posix'
|
||||
+ fi
|
||||
+ exeext=.exe
|
||||
+ ;;
|
||||
+changequote(,)dnl
|
||||
i[34567]86-*-netbsd*)
|
||||
changequote([,])dnl
|
||||
tm_file=i386/netbsd.h
|
||||
+ xm_file=i386/xm-netbsd.h
|
||||
tmake_file=t-netbsd
|
||||
use_collect2=yes
|
||||
;;
|
||||
@@ -3021,6 +3046,12 @@
|
||||
tmake_file=sparc/t-sparcbare
|
||||
tm_file="sparc/aout.h libgloss.h"
|
||||
;;
|
||||
+ sparc-*-netbsd*elf*)
|
||||
+ tm_file=sparc/netbsdelf.h
|
||||
+ xm_file=sparc/xm-netbsd.h
|
||||
+ tmake_file=t-netbsd
|
||||
+ use_collect2=yes
|
||||
+ ;;
|
||||
sparc-*-netbsd*)
|
||||
tm_file=sparc/netbsd.h
|
||||
tmake_file=t-netbsd
|
||||
@@ -3216,6 +3247,12 @@
|
||||
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
|
||||
gnu_ld=yes
|
||||
;;
|
||||
+ sparc64-*-netbsd*)
|
||||
+ tm_file=sparc/netbsd64.h
|
||||
+ xm_file=sparc/xm-netbsd64.h
|
||||
+ tmake_file=t-netbsd
|
||||
+ use_collect2=yes
|
||||
+ ;;
|
||||
# This hasn't been upgraded to GCC 2.
|
||||
# tahoe-harris-*) # Harris tahoe, using COFF.
|
||||
# tm_file=tahoe/harris.h
|
||||
@@ -3557,6 +3594,12 @@
|
||||
esac
|
||||
fi
|
||||
|
||||
+case $target in
|
||||
+ alpha*|sparc64*)
|
||||
+ build_xm_file="${build_xm_file} xm-target64.h"
|
||||
+ host_xm_file="${host_xm_file} xm-target64.h";;
|
||||
+esac
|
||||
+
|
||||
# Handle cpp installation.
|
||||
if test x$enable_cpp != xno
|
||||
then
|
44
cross/i386-netbsdpe/patches/patch-cp
Normal file
44
cross/i386-netbsdpe/patches/patch-cp
Normal file
|
@ -0,0 +1,44 @@
|
|||
$NetBSD: patch-cp,v 1.1 2001/01/30 03:09:00 minoura Exp $
|
||||
|
||||
--- gcc/cccp.c.orig Wed Jan 17 20:59:27 2001
|
||||
+++ gcc/cccp.c
|
||||
@@ -393,16 +393,23 @@
|
||||
/* Pick up GNU C++ specific include files. */
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0 },
|
||||
#ifdef CROSS_COMPILE
|
||||
+#if 0
|
||||
/* This is the dir for fixincludes. Put it just before
|
||||
the files that we fix. */
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0, 0 },
|
||||
- /* For cross-compilation, this dir name is generated
|
||||
- automatically in Makefile.in. */
|
||||
- { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0 },
|
||||
+#endif
|
||||
#ifdef TOOL_INCLUDE_DIR
|
||||
/* This is another place that the target system's headers might be. */
|
||||
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 0, 0 },
|
||||
#endif
|
||||
+ /* For cross-compilation, this dir name is generated
|
||||
+ automatically in Makefile.in. */
|
||||
+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0 },
|
||||
+#ifdef LOCAL_INCLUDE_DIR
|
||||
+ /* This should be /usr/local/include and should come before
|
||||
+ the fixincludes-fixed header files. */
|
||||
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 0 },
|
||||
+#endif
|
||||
#else /* not CROSS_COMPILE */
|
||||
#ifdef LOCAL_INCLUDE_DIR
|
||||
/* This should be /usr/local/include and should come before
|
||||
@@ -421,11 +428,11 @@
|
||||
#ifdef SYSTEM_INCLUDE_DIR
|
||||
{ SYSTEM_INCLUDE_DIR, 0, 0, 0, 0 },
|
||||
#endif
|
||||
+#endif /* not CROSS_COMPILE */
|
||||
#ifndef STANDARD_INCLUDE_COMPONENT
|
||||
#define STANDARD_INCLUDE_COMPONENT 0
|
||||
#endif
|
||||
{ STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 0 },
|
||||
-#endif /* not CROSS_COMPILE */
|
||||
{ 0, 0, 0, 0, 0 }
|
||||
};
|
||||
#endif /* no INCLUDE_DEFAULTS */
|
44
cross/i386-netbsdpe/patches/patch-cq
Normal file
44
cross/i386-netbsdpe/patches/patch-cq
Normal file
|
@ -0,0 +1,44 @@
|
|||
$NetBSD: patch-cq,v 1.1 2001/01/30 03:09:01 minoura Exp $
|
||||
|
||||
--- gcc/cppinit.c.orig Tue Oct 12 15:31:11 1999
|
||||
+++ gcc/cppinit.c
|
||||
@@ -129,16 +129,23 @@
|
||||
/* Pick up GNU C++ specific include files. */
|
||||
{ GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 },
|
||||
#ifdef CROSS_COMPILE
|
||||
+#if 0
|
||||
/* This is the dir for fixincludes. Put it just before
|
||||
the files that we fix. */
|
||||
{ GCC_INCLUDE_DIR, "GCC", 0, 0 },
|
||||
- /* For cross-compilation, this dir name is generated
|
||||
- automatically in Makefile.in. */
|
||||
- { CROSS_INCLUDE_DIR, "GCC", 0, 0 },
|
||||
+#endif
|
||||
#ifdef TOOL_INCLUDE_DIR
|
||||
/* This is another place that the target system's headers might be. */
|
||||
{ TOOL_INCLUDE_DIR, "BINUTILS", 0, 1 },
|
||||
#endif
|
||||
+ /* For cross-compilation, this dir name is generated
|
||||
+ automatically in Makefile.in. */
|
||||
+ { CROSS_INCLUDE_DIR, "GCC", 0, 0 },
|
||||
+#ifdef LOCAL_INCLUDE_DIR
|
||||
+ /* This should be /usr/local/include and should come before
|
||||
+ the fixincludes-fixed header files. */
|
||||
+ { LOCAL_INCLUDE_DIR, 0, 0, 1 },
|
||||
+#endif
|
||||
#else /* not CROSS_COMPILE */
|
||||
#ifdef LOCAL_INCLUDE_DIR
|
||||
/* This should be /usr/local/include and should come before
|
||||
@@ -157,11 +164,11 @@
|
||||
#ifdef SYSTEM_INCLUDE_DIR
|
||||
{ SYSTEM_INCLUDE_DIR, 0, 0, 0 },
|
||||
#endif
|
||||
+#endif /* not CROSS_COMPILE */
|
||||
#ifndef STANDARD_INCLUDE_COMPONENT
|
||||
#define STANDARD_INCLUDE_COMPONENT 0
|
||||
#endif
|
||||
{ STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0 },
|
||||
-#endif /* not CROSS_COMPILE */
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
#endif /* no INCLUDE_DEFAULTS */
|
14
cross/i386-netbsdpe/patches/patch-ma
Normal file
14
cross/i386-netbsdpe/patches/patch-ma
Normal file
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: patch-ma,v 1.1 2001/01/30 03:09:01 minoura Exp $
|
||||
|
||||
--- gcc/Makefile.in.pre-patch Tue Jan 16 21:47:24 2001
|
||||
+++ gcc/Makefile.in
|
||||
@@ -276,7 +276,8 @@
|
||||
# Directory in which to find other cross-compilation tools and headers.
|
||||
dollar = @dollar@
|
||||
# Used in install-cross.
|
||||
-gcc_tooldir = @gcc_tooldir@
|
||||
+#gcc_tooldir = @gcc_tooldir@
|
||||
+gcc_tooldir = $(prefix)/$(target_alias)
|
||||
# Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
|
||||
build_tooldir = $(exec_prefix)/$(target_alias)
|
||||
# Directory in which the compiler finds g++ includes.
|
|
@ -1,13 +1,13 @@
|
|||
$NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
||||
$NetBSD: patch-pe,v 1.1 2001/01/30 03:09:01 minoura Exp $
|
||||
|
||||
--- /dev/null Sun Oct 1 23:26:03 2000
|
||||
+++ gcc/config/i386/netbsd-pe.h Sun Oct 1 23:31:12 2000
|
||||
@@ -0,0 +1,454 @@
|
||||
--- /dev/null Fri Jan 26 01:33:46 2001
|
||||
+++ gcc/config/i386/netbsd-pe.h
|
||||
@@ -0,0 +1,538 @@
|
||||
+/* Operating system specific defines to be used when targeting GCC for
|
||||
+ hosting on Windows NT 3.x, using a Unix style C library and tools,
|
||||
+ as distinct from winnt.h, which is used to build GCC for use with a
|
||||
+ windows style library and tool set and uses the Microsoft tools.
|
||||
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
||||
+
|
||||
+This file is part of GNU CC.
|
||||
+
|
||||
|
@ -28,6 +28,8 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+
|
||||
+#define YES_UNDERSCORES
|
||||
+
|
||||
+#define BIGGEST_FIELD_ALIGNMENT 32
|
||||
+
|
||||
+#define DBX_DEBUGGING_INFO
|
||||
+#define SDB_DEBUGGING_INFO
|
||||
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
||||
|
@ -35,6 +37,31 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+#include "i386/gas.h"
|
||||
+#include "dbxcoff.h"
|
||||
+
|
||||
+/* Augment TARGET_SWITCHES with the cygwin/no-cygwin options. */
|
||||
+/*#define MASK_WIN32 0x40000000 Use -lming32 interface */
|
||||
+/*#define MASK_CYGWIN 0x20000000 Use -lcygwin interface */
|
||||
+#define MASK_WINDOWS 0x10000000 /* Use windows interface */
|
||||
+#define MASK_DLL 0x08000000 /* Use dll interface */
|
||||
+#define MASK_NOP_FUN_DLLIMPORT 0x20000 /* Ignore dllimport for functions */
|
||||
+
|
||||
+/*#define TARGET_WIN32 (target_flags & MASK_WIN32)*/
|
||||
+/*#define TARGET_CYGWIN (target_flags & MASK_CYGWIN)*/
|
||||
+#define TARGET_WINDOWS (target_flags & MASK_WINDOWS)
|
||||
+#define TARGET_DLL (target_flags & MASK_DLL)
|
||||
+#define TARGET_NOP_FUN_DLLIMPORT (target_flags & MASK_NOP_FUN_DLLIMPORT)
|
||||
+
|
||||
+#undef SUBTARGET_SWITCHES
|
||||
+#define SUBTARGET_SWITCHES \
|
||||
+/*{ "cygwin", MASK_CYGWIN, "Use the Cygwin interface" },*/ \
|
||||
+/*{ "no-cygwin", MASK_WIN32, "Use the Mingw32 interface" }, */\
|
||||
+{ "windows", MASK_WINDOWS, "Create GUI application" }, \
|
||||
+{ "console", -MASK_WINDOWS, "Create console application" }, \
|
||||
+{ "dll", MASK_DLL, "Generate code for a DLL" }, \
|
||||
+{ "nop-fun-dllimport", MASK_NOP_FUN_DLLIMPORT, "Ignore dllimport for functions" }, \
|
||||
+{ "no-nop-fun-dllimport", -MASK_NOP_FUN_DLLIMPORT, "" }, \
|
||||
+/*{ "threads", 0, "Use Mingw-specific thread support" },*/
|
||||
+
|
||||
+
|
||||
+/* Support the __declspec keyword by turning them into attributes.
|
||||
+ We currently only support: dllimport and dllexport.
|
||||
+ Note that the current way we do this may result in a collision with
|
||||
|
@ -47,18 +74,42 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+#undef CPP_PREDEFINES
|
||||
+#endif
|
||||
+
|
||||
+#define CPP_PREDEFINES "-Di386 -D__CYGWIN32__ -D__PEACE__ \
|
||||
+ -D_X86_=1 -D__STDC__=1 \
|
||||
+#define CPP_PREDEFINES "-Di386 -D__PEACE__ -D__CYGWIN32__ \
|
||||
+ -D_X86_=1 -D__STDC__=1\
|
||||
+ -D__stdcall=__attribute__((__stdcall__)) \
|
||||
+ -D__cdecl=__attribute__((__cdecl__)) \
|
||||
+ -D__declspec(x)=__attribute__((x)) \
|
||||
+ -Asystem(winnt) -Acpu(i386) -Amachine(i386)"
|
||||
+
|
||||
+/* Normally, -lgcc is not needed since everything in it is in the DLL, but we
|
||||
+ want to allow things to be added to it when installing new versions of
|
||||
+ GCC without making a new CYGWIN.DLL, so we leave it. Profiling is handled
|
||||
+ by calling the init function from the prologue. */
|
||||
+
|
||||
+#undef STARTFILE_SPEC
|
||||
+#define STARTFILE_SPEC "%{mdll:crt0dll%o%s} \
|
||||
+ %{!mdll: %{!mwindows:crt0%O%s} \
|
||||
+ %{mwindows:crt0win%O%s}}"
|
||||
+
|
||||
+#undef CPP_SPEC
|
||||
+#define CPP_SPEC "-remap %(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
|
||||
+ %{!mwindows:-D__NetBSD__ -D__PECOFF__} \
|
||||
+ %{!mwindows:-D__NetBSD__ -D__PECOFF__ -D__NetBSDPE__} \
|
||||
+ %{mwindows:-D_WIN32 -DWINNT}"
|
||||
+
|
||||
+/* This macro defines names of additional specifications to put in the specs
|
||||
+ that can be used in various specifications like CC1_SPEC. Its definition
|
||||
+ is an initializer with a subgrouping for each command option.
|
||||
+
|
||||
+ Each subgrouping contains a string constant, that defines the
|
||||
+ specification name, and a string constant that used by the GNU CC driver
|
||||
+ program.
|
||||
+
|
||||
+ Do not define this macro if it does not need to do anything. */
|
||||
+
|
||||
+/*#undef SUBTARGET_EXTRA_SPECS
|
||||
+#define SUBTARGET_EXTRA_SPECS \
|
||||
+ { "mingw_include_path", DEFAULT_TARGET_MACHINE }*/
|
||||
+
|
||||
+/* We have to dynamic link to get to the system DLLs. All of libc, libm and
|
||||
+ the Unix stuff is in cygwin.dll. The import library is called
|
||||
+ 'libcygwin.a'. For Windows applications, include more libraries, but
|
||||
|
@ -66,33 +117,26 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+ ld, but that doesn't work just yet. */
|
||||
+
|
||||
+#undef LIB_SPEC
|
||||
+#define LIB_SPEC "%{mwindows:-luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32 \
|
||||
+ -lkernel32 -lm} -lc"
|
||||
+#define LINK_SPEC "%{mwindows:--subsystem windows}"
|
||||
+#define LIB_SPEC "-lkernel32 \
|
||||
+ %{mwindows:-luser32 -lgdi32 -lcomdlg32 -ladvapi32 -lshell32 -lm} \
|
||||
+ -lpthread -lc"
|
||||
+
|
||||
+/* Normally, -lgcc is not needed since everything in it is in the DLL, but we
|
||||
+ want to allow things to be added to it when installing new versions of
|
||||
+ GCC without making a new CYGWIN.DLL, so we leave it. */
|
||||
+#define LINK_SPEC "%{mwindows:--subsystem windows} \
|
||||
+ %{mconsole:--subsystem console} \
|
||||
+ %{mdll:--dll -e _DllMainCRTStartup@12}"
|
||||
+
|
||||
+#undef STARTFILE_SPEC
|
||||
+#define STARTFILE_SPEC "crt0%O%s"
|
||||
+
|
||||
+#define SIZE_TYPE "unsigned int"
|
||||
+#define PTRDIFF_TYPE "int"
|
||||
+#define WCHAR_UNSIGNED 1
|
||||
+#define WCHAR_TYPE_SIZE 16
|
||||
+#define WCHAR_TYPE "short unsigned int"
|
||||
+
|
||||
+#define HAVE_ATEXIT 1
|
||||
+
|
||||
+
|
||||
+/* Ignore dllimport for functions. */
|
||||
+#define TARGET_NOP_FUN_DLLIMPORT (target_flags & 0x20000)
|
||||
+
|
||||
+#undef SUBTARGET_SWITCHES
|
||||
+#define SUBTARGET_SWITCHES \
|
||||
+ { "nop-fun-dllimport", 0x20000 }, \
|
||||
+ { "no-nop-fun-dllimport", -0x20000 }, \
|
||||
+ { "windows", 0x0 },
|
||||
+/* Enable parsing of #pragma pack(push,<n>) and #pragma pack(pop). */
|
||||
+#define HANDLE_PRAGMA_PACK_PUSH_POP 1
|
||||
+
|
||||
+/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
|
||||
+ is a valid machine specific attribute for DECL.
|
||||
|
@ -212,6 +256,20 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+ fprintf (FILE, "\n"); \
|
||||
+ } while (0)
|
||||
+
|
||||
+/* Don't allow flag_pic to propagate since gas may produce invalid code
|
||||
+ otherwise. */
|
||||
+
|
||||
+#undef SUBTARGET_OVERRIDE_OPTIONS
|
||||
+#define SUBTARGET_OVERRIDE_OPTIONS \
|
||||
+do { \
|
||||
+ if (flag_pic) \
|
||||
+ { \
|
||||
+ warning ("-f%s ignored for target (all code is position independent)",\
|
||||
+ (flag_pic > 1) ? "PIC" : "pic"); \
|
||||
+ flag_pic = 0; \
|
||||
+ } \
|
||||
+} while (0) \
|
||||
+
|
||||
+/* Define this macro if references to a symbol must be treated
|
||||
+ differently depending on something about the variable or
|
||||
+ function named by the symbol (such as what section it is in).
|
||||
|
@ -273,11 +331,7 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+#define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
|
||||
+do { \
|
||||
+ if (i386_pe_dllexport_name_p (NAME)) \
|
||||
+ { \
|
||||
+ drectve_section (); \
|
||||
+ fprintf ((STREAM), "\t.ascii \" -export:%s\"\n", \
|
||||
+ I386_PE_STRIP_ENCODING (NAME)); \
|
||||
+ } \
|
||||
+ i386_pe_record_exported_symbol (NAME, 1); \
|
||||
+ if (! i386_pe_dllimport_name_p (NAME)) \
|
||||
+ { \
|
||||
+ fprintf ((STREAM), "\t.comm\t"); \
|
||||
|
@ -292,13 +346,7 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+#define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) \
|
||||
+do { \
|
||||
+ if (i386_pe_dllexport_name_p (NAME)) \
|
||||
+ { \
|
||||
+ enum in_section save_section = in_section; \
|
||||
+ drectve_section (); \
|
||||
+ fprintf ((STREAM), "\t.ascii \" -export:%s\"\n", \
|
||||
+ I386_PE_STRIP_ENCODING (NAME)); \
|
||||
+ switch_to_section (save_section, (DECL)); \
|
||||
+ } \
|
||||
+ i386_pe_record_exported_symbol (NAME, 1); \
|
||||
+ ASM_OUTPUT_LABEL ((STREAM), (NAME)); \
|
||||
+} while (0)
|
||||
+
|
||||
|
@ -361,7 +409,14 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+ else if (DECL && DECL_READONLY_SECTION (DECL, RELOC)) \
|
||||
+ type = SECT_RO, mode = ""; \
|
||||
+ else \
|
||||
+ type = SECT_RW, mode = "w"; \
|
||||
+ { \
|
||||
+ type = SECT_RW; \
|
||||
+ if (TREE_CODE (DECL) == VAR_DECL \
|
||||
+ && lookup_attribute ("shared", DECL_MACHINE_ATTRIBUTES (DECL))) \
|
||||
+ mode = "ws"; \
|
||||
+ else \
|
||||
+ mode = "w"; \
|
||||
+ } \
|
||||
+ \
|
||||
+ if (s == 0) \
|
||||
+ { \
|
||||
|
@ -394,12 +449,7 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+ do \
|
||||
+ { \
|
||||
+ if (i386_pe_dllexport_name_p (NAME)) \
|
||||
+ { \
|
||||
+ drectve_section (); \
|
||||
+ fprintf ((FILE), "\t.ascii \" -export:%s\"\n", \
|
||||
+ I386_PE_STRIP_ENCODING (NAME)); \
|
||||
+ function_section (DECL); \
|
||||
+ } \
|
||||
+ i386_pe_record_exported_symbol (NAME, 0); \
|
||||
+ if (write_symbols != SDB_DEBUG) \
|
||||
+ i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL)); \
|
||||
+ ASM_OUTPUT_LABEL (FILE, NAME); \
|
||||
|
@ -420,6 +470,11 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \
|
||||
+ i386_pe_declare_function_type (FILE, XSTR (FUN, 0), 1)
|
||||
+
|
||||
+/* This says out to put a global symbol in the BSS section. */
|
||||
+#undef ASM_OUTPUT_ALIGNED_BSS
|
||||
+#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
|
||||
+ asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
|
||||
+
|
||||
+/* Output function declarations at the end of the file. */
|
||||
+#define ASM_FILE_END(FILE) \
|
||||
+ i386_pe_asm_file_end (FILE)
|
||||
|
@ -433,6 +488,20 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+/* Don't assume anything about the header files. */
|
||||
+#define NO_IMPLICIT_EXTERN_C
|
||||
+
|
||||
+#define SUBTARGET_PROLOGUE \
|
||||
+ if (profile_flag \
|
||||
+ && strcmp (IDENTIFIER_POINTER (DECL_NAME (current_function_decl)),\
|
||||
+ "main") == 0) \
|
||||
+ { \
|
||||
+ rtx xops[1]; \
|
||||
+ xops[0] = gen_rtx_MEM (FUNCTION_MODE, \
|
||||
+ gen_rtx (SYMBOL_REF, Pmode, "_monstartup")); \
|
||||
+ if (do_rtl) \
|
||||
+ emit_call_insn (gen_rtx (CALL, VOIDmode, xops[0], const0_rtx)); \
|
||||
+ else \
|
||||
+ output_asm_insn (AS1 (call,%P1), xops); \
|
||||
+ }
|
||||
+
|
||||
+/* External function declarations. */
|
||||
+
|
||||
+#ifndef PROTO
|
||||
|
@ -451,9 +520,24 @@ $NetBSD: patch-ag,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
|||
+
|
||||
+extern void i386_pe_record_external_function PROTO((char *));
|
||||
+extern void i386_pe_declare_function_type STDIO_PROTO((FILE *, char *, int));
|
||||
+extern void i386_pe_record_exported_symbol PROTO((char *, int));
|
||||
+extern void i386_pe_asm_file_end STDIO_PROTO((FILE *));
|
||||
+
|
||||
+/* For Win32 ABI compatibility */
|
||||
+#undef DEFAULT_PCC_STRUCT_RETURN
|
||||
+#define DEFAULT_PCC_STRUCT_RETURN 0
|
||||
+
|
||||
+/* No data type wants to be aligned rounder than this. */
|
||||
+#undef BIGGEST_ALIGNMENT
|
||||
+#define BIGGEST_ALIGNMENT 128
|
||||
+
|
||||
+/* A bitfield declared as `int' forces `int' alignment for the struct. */
|
||||
+#undef PCC_BITFIELD_TYPE_MATTERS
|
||||
+#define PCC_BITFIELD_TYPE_MATTERS 1
|
||||
+#define GROUP_BITFIELDS_BY_ALIGN TYPE_NATIVE(rec)
|
||||
+
|
||||
+/* Enable alias attribute support. */
|
||||
+#ifndef SET_ASM_OP
|
||||
+#define SET_ASM_OP "\t.set"
|
||||
+#endif
|
||||
+
|
|
@ -1 +1,11 @@
|
|||
This cross-compile environment is for PE/COFF NetBSD/i386.
|
||||
This cross-compile environment is for PE/COFF NetBSD/i386, and
|
||||
it is based on gcc-2.95.2 + the x86-win32 patch.
|
||||
|
||||
The preprocessor predefines following symbols:
|
||||
* i386 _X86
|
||||
* __PEACE__
|
||||
* __CYGWIN32__
|
||||
* __NetBSD__ __PECOFF__ __NetBSDPE__ (if -mwindows is not specified)
|
||||
* _WIN32 WINNT (if -mwindows is specified)
|
||||
|
||||
The compiler is capable of anonymous unions/structs.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
@comment $NetBSD: PLIST,v 1.1.1.1 2000/11/06 03:15:16 minoura Exp $
|
||||
@comment $NetBSD: PLIST,v 1.2 2001/01/30 03:09:02 minoura Exp $
|
||||
bin/${TARGET_ARCH}-dlltool
|
||||
bin/${TARGET_ARCH}-windres
|
||||
${TARGET_ARCH}/bin/dlltool
|
||||
${TARGET_ARCH}/bin/windres
|
||||
${TARGET_ARCH}/include/assert.h
|
||||
|
|
Loading…
Reference in a new issue