Date: Sun, 25 May 2003 13:08:54 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 31864 for review Message-ID: <200305252008.h4PK8sAU007239@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=31864 Change 31864 by peter@peter_hammer on 2003/05/25 13:08:00 Minor hack to enable dual mode gcc. I hope to use this for bootblocks. hammer# ls /compat/ia32/usr/lib crt1.o crtbeginS.o crtendS.o crtn.o libc.so libgcc.a crtbegin.o crtend.o crti.o libc.a libc.so.5 hammer# cc -B/compat/ia32/usr/lib -m32 foo.c hammer# ./a.out hello world! hammer# file a.out a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 5.0, dynamically linked (uses shared libs), not stripped Affected files ... .. //depot/projects/hammer/gnu/usr.bin/binutils/ld/Makefile.amd64#2 edit .. //depot/projects/hammer/gnu/usr.bin/cc/cc_tools/Makefile#7 edit Differences ... ==== //depot/projects/hammer/gnu/usr.bin/binutils/ld/Makefile.amd64#2 (text+ko) ==== @@ -18,3 +18,17 @@ sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_x86_64_path} \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ "${NATIVE_EMULATION}" "" ${NATIVE_EMULATION} "${TARGET_TUPLE}" + +X86_EMULATION= elf_i386_fbsd +_i386_path= \"${TOOLS_PREFIX}/usr/lib/i386\" +EMS+= ${X86_EMULATION} +LDSCRIPTS+= ${X86_EMULATION}.x ${X86_EMULATION}.xbn ${X86_EMULATION}.xn ${X86_EMULATION}.xr \ + ${X86_EMULATION}.xs ${X86_EMULATION}.xu ${X86_EMULATION}.xc ${X86_EMULATION}.xsc +SRCS+= e${X86_EMULATION}.c +CLEANFILES+= e${X86_EMULATION}.c + +e${X86_EMULATION}.c: emulparams/${X86_EMULATION}.sh emultempl/elf32.em scripttempl/elf.sc \ + genscripts.sh stringify.sed + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${_i386_path} \ + ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ + "${X86_EMULATION}" "" ${X86_EMULATION} "${TARGET_TUPLE}" ==== //depot/projects/hammer/gnu/usr.bin/cc/cc_tools/Makefile#7 (text+ko) ==== @@ -146,6 +146,7 @@ # XXX: consider including i386/biarch64.h instead of below .if ${TARGET_ARCH} == "amd64" echo '#define TARGET_64BIT_DEFAULT 1' >>${.TARGET} + echo '#define TARGET_BI_ARCH 1' >>${.TARGET} .endif .if ${TARGET_ARCH} == "ia64" echo '#define TARGET_CPU_DEFAULT (MASK_GNU_AS|MASK_GNU_LD)' >>${.TARGET}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305252008.h4PK8sAU007239>
