From cb931ce6939d6d325cdae98a5edf0c0784771bfd Mon Sep 17 00:00:00 2001 From: andreast Date: Sat, 19 Nov 2011 19:25:57 +0000 Subject: Rename the linker emulation name for powerpc and powerc64. This is needed that we can also use the upstream binutils linker where we have to have a unique name for the FreeBSD emulation. --- Makefile.inc1 | 2 +- contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh | 3 +++ contrib/gcc/config/rs6000/freebsd.h | 2 +- contrib/llvm/tools/clang/lib/Driver/Tools.cpp | 2 +- gnu/usr.bin/binutils/ld/Makefile.powerpc | 2 +- gnu/usr.bin/binutils/ld/Makefile.powerpc64 | 4 ++-- sys/boot/ofw/Makefile.inc | 2 +- sys/boot/powerpc/Makefile.inc | 2 +- sys/boot/uboot/Makefile.inc | 2 +- 9 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh diff --git a/Makefile.inc1 b/Makefile.inc1 index 2f4f84c..ed4ad3c 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -291,7 +291,7 @@ LIB32CPUFLAGS= -mcpu=powerpc LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE} .endif LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc \ - LD="${LD} -m elf32ppc" + LD="${LD} -m elf32ppc_fbsd" .endif diff --git a/contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh b/contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh new file mode 100644 index 0000000..ec2374f --- /dev/null +++ b/contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/elf64ppc.sh +. ${srcdir}/emulparams/elf_fbsd.sh + diff --git a/contrib/gcc/config/rs6000/freebsd.h b/contrib/gcc/config/rs6000/freebsd.h index 3136a85..56907a3 100644 --- a/contrib/gcc/config/rs6000/freebsd.h +++ b/contrib/gcc/config/rs6000/freebsd.h @@ -193,7 +193,7 @@ extern int dot_symbols; #undef LINK_OS_FREEBSD_SPEC #define ASM_DEFAULT_SPEC "-mppc%{!m32:64}" #define ASM_SPEC "%{m32:-a32}%{!m32:-a64} " SVR4_ASM_SPEC -#define LINK_OS_FREEBSD_SPEC "%{m32:-melf32ppc}%{!m32:-melf64ppc} " LINK_OS_FREEBSD_SPEC_DEF +#define LINK_OS_FREEBSD_SPEC "%{m32:-melf32ppc_fbsd}%{!m32:-melf64ppc_fbsd} " LINK_OS_FREEBSD_SPEC_DEF #endif /* _init and _fini functions are built from bits spread across many diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp index 94849a6..75cadc6 100644 --- a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp +++ b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp @@ -3926,7 +3926,7 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA, if (getToolChain().getArchName() == "powerpc") { CmdArgs.push_back("-m"); - CmdArgs.push_back("elf32ppc"); + CmdArgs.push_back("elf32ppc_fbsd"); } if (Output.isFilename()) { diff --git a/gnu/usr.bin/binutils/ld/Makefile.powerpc b/gnu/usr.bin/binutils/ld/Makefile.powerpc index 921b88c..fed5234 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.powerpc +++ b/gnu/usr.bin/binutils/ld/Makefile.powerpc @@ -1,6 +1,6 @@ # $FreeBSD$ -NATIVE_EMULATION= elf32ppc +NATIVE_EMULATION= elf32ppc_fbsd SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c diff --git a/gnu/usr.bin/binutils/ld/Makefile.powerpc64 b/gnu/usr.bin/binutils/ld/Makefile.powerpc64 index 8c607d7..29fba2a 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.powerpc64 +++ b/gnu/usr.bin/binutils/ld/Makefile.powerpc64 @@ -1,6 +1,6 @@ # $FreeBSD$ -NATIVE_EMULATION= elf64ppc +NATIVE_EMULATION= elf64ppc_fbsd SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c @@ -11,7 +11,7 @@ e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} -PPC32_EMULATION= elf32ppc +PPC32_EMULATION= elf32ppc_fbsd _ppc32_path= \"${TOOLS_PREFIX}/usr/lib32\" EMS+= ${PPC32_EMULATION} .for ext in ${ELF_SCR_EXT} diff --git a/sys/boot/ofw/Makefile.inc b/sys/boot/ofw/Makefile.inc index dab65e5..e67c0dc 100644 --- a/sys/boot/ofw/Makefile.inc +++ b/sys/boot/ofw/Makefile.inc @@ -2,7 +2,7 @@ .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -mcpu=powerpc -LDFLAGS+= -m elf32ppc +LDFLAGS+= -m elf32ppc_fbsd .endif .include "../Makefile.inc" diff --git a/sys/boot/powerpc/Makefile.inc b/sys/boot/powerpc/Makefile.inc index dab65e5..e67c0dc 100644 --- a/sys/boot/powerpc/Makefile.inc +++ b/sys/boot/powerpc/Makefile.inc @@ -2,7 +2,7 @@ .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -mcpu=powerpc -LDFLAGS+= -m elf32ppc +LDFLAGS+= -m elf32ppc_fbsd .endif .include "../Makefile.inc" diff --git a/sys/boot/uboot/Makefile.inc b/sys/boot/uboot/Makefile.inc index dab65e5..e67c0dc 100644 --- a/sys/boot/uboot/Makefile.inc +++ b/sys/boot/uboot/Makefile.inc @@ -2,7 +2,7 @@ .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -mcpu=powerpc -LDFLAGS+= -m elf32ppc +LDFLAGS+= -m elf32ppc_fbsd .endif .include "../Makefile.inc" -- cgit v1.1