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.
This commit is contained in:
Andreas Tobler 2011-11-19 19:25:57 +00:00
parent 8d7813e7e9
commit 6bac4c3e6a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=227739
9 changed files with 12 additions and 9 deletions

View File

@ -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

View File

@ -0,0 +1,3 @@
. ${srcdir}/emulparams/elf64ppc.sh
. ${srcdir}/emulparams/elf_fbsd.sh

View File

@ -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

View File

@ -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()) {

View File

@ -1,6 +1,6 @@
# $FreeBSD$
NATIVE_EMULATION= elf32ppc
NATIVE_EMULATION= elf32ppc_fbsd
SRCS+= e${NATIVE_EMULATION}.c
CLEANFILES+= e${NATIVE_EMULATION}.c

View File

@ -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}

View File

@ -2,7 +2,7 @@
.if ${MACHINE_ARCH} == "powerpc64"
CFLAGS+= -m32 -mcpu=powerpc
LDFLAGS+= -m elf32ppc
LDFLAGS+= -m elf32ppc_fbsd
.endif
.include "../Makefile.inc"

View File

@ -2,7 +2,7 @@
.if ${MACHINE_ARCH} == "powerpc64"
CFLAGS+= -m32 -mcpu=powerpc
LDFLAGS+= -m elf32ppc
LDFLAGS+= -m elf32ppc_fbsd
.endif
.include "../Makefile.inc"

View File

@ -2,7 +2,7 @@
.if ${MACHINE_ARCH} == "powerpc64"
CFLAGS+= -m32 -mcpu=powerpc
LDFLAGS+= -m elf32ppc
LDFLAGS+= -m elf32ppc_fbsd
.endif
.include "../Makefile.inc"