From owner-p4-projects@FreeBSD.ORG Sun May 25 13:08:56 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9C0F237B404; Sun, 25 May 2003 13:08:55 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B6BE37B401 for ; Sun, 25 May 2003 13:08:55 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CC5C243F3F for ; Sun, 25 May 2003 13:08:54 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4PK8s0U007242 for ; Sun, 25 May 2003 13:08:54 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4PK8sAU007239 for perforce@freebsd.org; Sun, 25 May 2003 13:08:54 -0700 (PDT) Date: Sun, 25 May 2003 13:08:54 -0700 (PDT) Message-Id: <200305252008.h4PK8sAU007239@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 31864 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 May 2003 20:08:56 -0000 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}