diff --git a/Makefile.inc1 b/Makefile.inc1 index 2f4f84c683d8..ed4ad3cac910 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 000000000000..ec2374fc5442 --- /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 3136a85a2ac1..56907a380996 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 94849a6601eb..75cadc61a215 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 921b88c733f7..fed52341c089 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 8c607d7b9ae5..29fba2afc9bf 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 dab65e52621d..e67c0dc904eb 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 dab65e52621d..e67c0dc904eb 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 dab65e52621d..e67c0dc904eb 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"