PERFORCE change 130196 for review
John Birrell
jb at FreeBSD.org
Tue Dec 4 13:02:24 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=130196
Change 130196 by jb at jb_freebsd1 on 2007/12/04 21:01:34
Rehash the linker build.
- Build in the emulations that the GNU release builds in.
- Where they distribute the .c file generated by bison, just use that
rather than generating a new one.
Affected files ...
.. //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile#5 edit
.. //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.alpha#3 edit
.. //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.amd64#3 edit
.. //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.arm#3 edit
.. //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.i386#3 edit
.. //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.ia64#3 edit
.. //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.powerpc#3 edit
.. //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.sparc64#3 edit
Differences ...
==== //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile#5 (text+ko) ====
@@ -11,7 +11,7 @@
PROG= ld
SCRIPTDIR= /usr/libdata/ldscripts
SRCS+= ldcref.c ldctor.c ldemul.c ldemul-list.h ldexp.c ldfile.c \
- ldgram.y ldlang.c ldlex.l ldmain.c ldmisc.c \
+ xldgram.c ldlang.c xldlex.c ldmain.c ldmisc.c \
ldver.c ldwrite.c lexsup.c mri.c sha1.c
WARNS?= 0 # ldemul.h problem (`struct option' declared inside parameter list)
@@ -22,29 +22,29 @@
CFLAGS+= -DBINDIR=\"${BINDIR}\" -DTARGET_SYSTEM_ROOT=\"${TOOLS_PREFIX}\"
CFLAGS+= -DTOOLBINDIR=\"${TOOLS_PREFIX}/${BINDIR}/libexec\"
CFLAGS+= -D_GNU_SOURCE
+CFLAGS+= -DYYERROR_VERBOSE
CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd
-CFLAGS+= -I${.CURDIR}/../libintl
NO_SHARED?= yes
DPADD= ${RELTOP}/libbfd/libbfd.a
DPADD+= ${RELTOP}/libiberty/libiberty.a
-DPADD+= ${RELTOP}/libintl/libintl.a
LDADD= ${DPADD}
CLEANDIRS+= ldscripts
-CLEANFILES+= ldemul-list.h stringify.sed
+CLEANFILES+= ldemul-list.h stringify.sed xldgram.c xldlex.c
HOST= ${TARGET_TUPLE}
LIBSERACHPATH= \"${TOOLS_PREFIX}/lib\":\"${TOOLS_PREFIX}/usr/lib\"
-ELF_SCR_EXT= x xbn xn xr xs xu xc xsc xd xdc
-.for ext in ${ELF_SCR_EXT}
-LDSCRIPTS+= ${NATIVE_EMULATION}.${ext}
-.endfor
+LIB_PATH= ${TOOLS_PREFIX}/lib ${TOOLS_PREFIX}/usr/lib
+ELF_SCR_EXT= x xbn xn xr xs xu xc xsc xd xdc xdw xsw xw
-EMS+= ${NATIVE_EMULATION}
EMXFR=
EMLST=
+LDSCRIPTS=
.for _e in ${EMS}
EMXFR+= extern ld_emulation_xfer_type ld_${_e}_emulation;
EMLST+= &ld_${_e}_emulation,
+.for ext in ${ELF_SCR_EXT}
+LDSCRIPTS+= ${_e}.${ext}
+.endfor
.endfor
ldemul-list.h:
@@ -54,6 +54,12 @@
stringify.sed:
ln -sf ${SRCDIR}/ld/emultempl/astring.sed ${.TARGET}
+xldgram.c : ${SRCDIR}/ld/ldgram.c
+ cp ${.ALLSRC} ${.TARGET}
+
+xldlex.c : ${SRCDIR}/ld/ldlex.c
+ cp ${.ALLSRC} ${.TARGET}
+
afterinstall:
${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
${LDSCRIPTS:S|^|ldscripts/|} ${DESTDIR}${SCRIPTDIR}
==== //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.alpha#3 (text+ko) ====
@@ -1,6 +1,7 @@
# $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile.alpha,v 1.23 2006/07/22 14:37:17 obrien Exp $
NATIVE_EMULATION= elf64alpha_fbsd
+EMS= ${NATIVE_EMULATION}
EMS+= elf64alpha alpha
.for ext in ${ELF_SCR_EXT}
==== //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.amd64#3 (text+ko) ====
@@ -2,29 +2,32 @@
NATIVE_EMULATION= elf_x86_64_fbsd
-SRCS+= e${NATIVE_EMULATION}.c
-CLEANFILES+= e${NATIVE_EMULATION}.c
-e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \
- scripttempl/elf.sc stringify.sed
- sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \
+.for _E in ${NATIVE_EMULATION} elf_x86_64
+
+SRCS+= e${_E}.c
+CLEANFILES+= e${_E}.c
+EMS+= ${_E}
+e${_E}.c: emulparams/${_E}.sh emultempl/elf32.em scripttempl/elf.sc stringify.sed
+ LIB_PATH="${LIB_PATH}" sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \
${TOOLS_PREFIX}/usr \
${TOOLS_PREFIX}/usr \
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
- ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE}
+ ${_E} "" yes ${_E} ${TARGET_TUPLE}
+
+.endfor
-X86_EMULATION= elf_i386_fbsd
_i386_path= \"${TOOLS_PREFIX}/usr/lib/i386\"
-EMS+= ${X86_EMULATION}
-.for ext in ${ELF_SCR_EXT}
-LDSCRIPTS+= ${X86_EMULATION}.${ext}
-.endfor
+
+.for _E in elf_i386_fbsd elf_i386
-SRCS+= e${X86_EMULATION}.c
-CLEANFILES+= e${X86_EMULATION}.c
-e${X86_EMULATION}.c: emulparams/${X86_EMULATION}.sh emultempl/elf32.em \
- scripttempl/elf.sc stringify.sed
- sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${_i386_path} \
+SRCS+= e${_E}.c
+CLEANFILES+= e${_E}.c
+EMS+= ${_E}
+e${_E}.c: emulparams/${_E}.sh emultempl/elf32.em scripttempl/elf.sc stringify.sed
+ LIB_PATH="${LIB_PATH}" sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${_i386_path} \
${TOOLS_PREFIX}/usr \
${TOOLS_PREFIX}/usr \
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
- ${X86_EMULATION} "" no ${X86_EMULATION} ${TARGET_TUPLE}
+ ${_E} "" yes ${_E} ${TARGET_TUPLE}
+
+.endfor
==== //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.arm#3 (text+ko) ====
@@ -5,6 +5,7 @@
.else
NATIVE_EMULATION= armelf_fbsd
.endif
+EMS= ${NATIVE_EMULATION}
SRCS+= e${NATIVE_EMULATION}.c
CLEANFILES+= e${NATIVE_EMULATION}.c
==== //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.i386#3 (text+ko) ====
@@ -2,12 +2,16 @@
NATIVE_EMULATION= elf_i386_fbsd
-SRCS+= e${NATIVE_EMULATION}.c
-CLEANFILES+= e${NATIVE_EMULATION}.c
-e${NATIVE_EMULATION}.c: emulparams/${NATIVE_EMULATION}.sh emultempl/elf32.em \
- scripttempl/elf.sc stringify.sed
+.for _E in ${NATIVE_EMULATION} elf_i386
+
+SRCS+= e${_E}.c
+CLEANFILES+= e${_E}.c
+EMS+= ${_E}
+e${_E}.c: emulparams/${_E}.sh emultempl/elf32.em scripttempl/elf.sc stringify.sed
sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \
${TOOLS_PREFIX}/usr \
${TOOLS_PREFIX}/usr \
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
- ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE}
+ ${_E} "" no ${_E} ${TARGET_TUPLE}
+
+.endfor
==== //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.ia64#3 (text+ko) ====
@@ -1,6 +1,7 @@
# $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile.ia64,v 1.10 2006/07/22 14:37:17 obrien Exp $
NATIVE_EMULATION= elf64_ia64_fbsd
+EMS= ${NATIVE_EMULATION}
SRCS+= e${NATIVE_EMULATION}.c
CLEANFILES+= e${NATIVE_EMULATION}.c
==== //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.powerpc#3 (text+ko) ====
@@ -1,6 +1,7 @@
# $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile.powerpc,v 1.16 2004/07/08 17:05:32 obrien Exp $
NATIVE_EMULATION= elf32ppc
+EMS= ${NATIVE_EMULATION}
SRCS+= e${NATIVE_EMULATION}.c
CLEANFILES+= e${NATIVE_EMULATION}.c
==== //depot/projects/binutils/src/gnu/usr.bin/binutils/ld/Makefile.sparc64#3 (text+ko) ====
@@ -1,6 +1,7 @@
# $FreeBSD: src/gnu/usr.bin/binutils/ld/Makefile.sparc64,v 1.16 2004/07/08 17:05:32 obrien Exp $
NATIVE_EMULATION= elf64_sparc_fbsd
+EMS= ${NATIVE_EMULATION}
SRCS+= e${NATIVE_EMULATION}.c
CLEANFILES+= e${NATIVE_EMULATION}.c
More information about the p4-projects
mailing list