From: zrj Date: Sat, 19 May 2018 07:30:59 +0000 (+0300) Subject: boot/pc32: Filter out global LDFLAGS. X-Git-Tag: v5.5.0~607 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/faa6f4d7da5ad6ef2d3e68dd2671b6d6f8161a9b boot/pc32: Filter out global LDFLAGS. For cases when we need to set global LDFLAGS for compiler frontends. --- diff --git a/sys/boot/pc32/boot0/Makefile b/sys/boot/pc32/boot0/Makefile index 7633cdec3b..8462ca0c48 100644 --- a/sys/boot/pc32/boot0/Makefile +++ b/sys/boot/pc32/boot0/Makefile @@ -1,5 +1,4 @@ # $FreeBSD: src/sys/boot/i386/boot0/Makefile,v 1.17 2002/09/17 01:48:54 peter Exp $ -# $DragonFly: src/sys/boot/pc32/boot0/Makefile,v 1.6 2008/07/06 17:17:01 mneumann Exp $ PROG?= boot0 NOMAN= @@ -61,7 +60,7 @@ CFLAGS+=-DFLAGS=${BOOT_BOOT0_FLAGS} \ # ${PROG}: boot0.o bootasmdef.nx @echo "boot0 origin set to `${.OBJDIR}/bootasmdef.nx BOOT0_ORIGIN`" - ${LD} ${LDFLAGS} -N -e start -Ttext `${.OBJDIR}/bootasmdef.nx BOOT0_ORIGIN` -o boot0.out boot0.o + ${LD} ${LDFLAGS:N-Wl,*} -N -e start -Ttext `${.OBJDIR}/bootasmdef.nx BOOT0_ORIGIN` -o boot0.out boot0.o objcopy -S -O binary boot0.out ${.TARGET} boot0.o: boot0.S diff --git a/sys/boot/pc32/boot2/Makefile b/sys/boot/pc32/boot2/Makefile index 1ab8381a61..5c9f07af1d 100644 --- a/sys/boot/pc32/boot2/Makefile +++ b/sys/boot/pc32/boot2/Makefile @@ -106,7 +106,7 @@ boot1$s: boot1$s.out objcopy -S -O binary boot1$s.out ${.TARGET} boot1$s.out: boot1$s.o bootasmdef.nx - ${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} ${.ALLSRC:M*.o} + ${LD} ${LDFLAGS:N-Wl,*} -e start -Ttext ${ORG1} -o ${.TARGET} ${.ALLSRC:M*.o} boot1$s.o: boot1.S ${CC} ${CFLAGS} ${_ADDCFLAGS$s} -DFLAGS=${B1FLAGS} \ @@ -143,7 +143,7 @@ boot2$s.bin: boot2$s.out objcopy -S -O binary boot2$s.out ${.TARGET} boot2$s.out: boot2$s.o sio.o ${_ADDOBJS$s} - ${LD} ${LDFLAGS} -Ttext ${ORG2} ${LINKSCRIPT} -o ${.TARGET} \ + ${LD} ${LDFLAGS:N-Wl,*} -Ttext ${ORG2} ${LINKSCRIPT} -o ${.TARGET} \ ${BTX}/lib/crt0.o ${.ALLSRC} CLEANFILES+= boot1$s boot1$s.out boot1$s.o \ diff --git a/sys/boot/pc32/btx/btx/Makefile b/sys/boot/pc32/btx/btx/Makefile index 11f0d35a0c..ff952c2d06 100644 --- a/sys/boot/pc32/btx/btx/Makefile +++ b/sys/boot/pc32/btx/btx/Makefile @@ -20,7 +20,7 @@ CFLAGS+= -DBTX_SERIAL -DSIOPRT=${BOOT_COMCONSOLE_PORT} \ all: btx btx: btx.o - ${LD} ${LDFLAGS} -N -e start \ + ${LD} ${LDFLAGS:N-Wl,*} -N -e start \ --script ${.CURDIR}/btx.ldscript -o btx.out btx.o objcopy -S -O binary btx.out ${.TARGET} diff --git a/sys/boot/pc32/btx/btxldr/Makefile b/sys/boot/pc32/btx/btxldr/Makefile index c693395feb..eb31f009c0 100644 --- a/sys/boot/pc32/btx/btxldr/Makefile +++ b/sys/boot/pc32/btx/btxldr/Makefile @@ -10,7 +10,7 @@ CFLAGS+= -DBTXLDR_VERBOSE all: btxldr btxldr: btxldr.o - ${LD} ${LDFLAGS} -N -e start -Ttext ${LOADER_ADDRESS} \ + ${LD} ${LDFLAGS:N-Wl,*} -N -e start -Ttext ${LOADER_ADDRESS} \ --script ${.CURDIR}/btxldr.ldscript -o btxldr.out btxldr.o objcopy -S -O binary btxldr.out ${.TARGET} diff --git a/sys/boot/pc32/btx/lib/Makefile b/sys/boot/pc32/btx/lib/Makefile index 3b14a59829..3ff474f432 100644 --- a/sys/boot/pc32/btx/lib/Makefile +++ b/sys/boot/pc32/btx/lib/Makefile @@ -6,6 +6,6 @@ CLEANFILES= crt0.o all: crt0.o crt0.o: ${OBJS} - ${LD} ${LDFLAGS} -r -o ${.TARGET} ${OBJS} + ${LD} ${LDFLAGS:N-Wl,*} -r -o ${.TARGET} ${OBJS} .include diff --git a/sys/boot/pc32/cdboot/Makefile b/sys/boot/pc32/cdboot/Makefile index efb42c03c6..9aa5c2db90 100644 --- a/sys/boot/pc32/cdboot/Makefile +++ b/sys/boot/pc32/cdboot/Makefile @@ -1,5 +1,4 @@ # $FreeBSD: src/sys/boot/i386/cdboot/Makefile,v 1.5 2002/09/17 01:48:55 peter Exp $ -# $DragonFly: src/sys/boot/pc32/cdboot/Makefile,v 1.4 2004/01/31 06:56:42 dillon Exp $ ORG= 0x7c00 @@ -10,7 +9,7 @@ BINDIR?= /boot CFLAGS+= ${ASSEMBLER_FLAGS} ${PROG}: ${PROG}.o - ${LD} ${LDFLAGS} -N -e start -Ttext ${ORG} -o ${PROG}.out ${PROG}.o + ${LD} ${LDFLAGS:N-Wl,*} -N -e start -Ttext ${ORG} -o ${PROG}.out ${PROG}.o objcopy -S -O binary ${PROG}.out ${.TARGET} CLEANFILES+= ${PROG}.o ${PROG}.out diff --git a/sys/boot/pc32/mbr/Makefile b/sys/boot/pc32/mbr/Makefile index 343a91c6d4..58bbb6ffe0 100644 --- a/sys/boot/pc32/mbr/Makefile +++ b/sys/boot/pc32/mbr/Makefile @@ -1,5 +1,4 @@ # $FreeBSD: src/sys/boot/i386/mbr/Makefile,v 1.6 2002/09/17 01:48:55 peter Exp $ -# $DragonFly: src/sys/boot/pc32/mbr/Makefile,v 1.3 2003/11/10 06:08:36 dillon Exp $ PROG= mbr NOMAN= @@ -10,7 +9,7 @@ BINMODE= 444 ORG= 0x600 mbr: mbr.o - ${LD} ${LDFLAGS} -N -e start -Ttext ${ORG} -o mbr.out mbr.o + ${LD} ${LDFLAGS:-Wl,*} -N -e start -Ttext ${ORG} -o mbr.out mbr.o objcopy -S -O binary mbr.out ${.TARGET} CLEANFILES+= mbr.out mbr.o diff --git a/sys/boot/pc32/pxeldr/Makefile b/sys/boot/pc32/pxeldr/Makefile index 8259b0d103..c2485806ed 100644 --- a/sys/boot/pc32/pxeldr/Makefile +++ b/sys/boot/pc32/pxeldr/Makefile @@ -1,5 +1,4 @@ # $FreeBSD: src/sys/boot/i386/pxeldr/Makefile,v 1.9 2003/09/03 08:12:20 phk Exp $ -# $DragonFly: src/sys/boot/pc32/pxeldr/Makefile,v 1.5 2004/07/18 23:40:09 dillon Exp $ ORG= 0x7c00 @@ -46,7 +45,7 @@ ${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} ${BTXCRT} -b ${BTXKERN} ${LOADERBIN} ${LDR}: ${LDR}.o - ${LD} ${LDFLAGS} -N -e start -Ttext ${ORG} -o ${LDR}.out ${LDR}.o + ${LD} ${LDFLAGS:N-Wl,*} -N -e start -Ttext ${ORG} -o ${LDR}.out ${LDR}.o objcopy -S -O binary ${LDR}.out ${.TARGET} ${LDR}.o: ${LDR}.S