Author: andrew
Date: Sat Apr 11 10:36:48 2015
New Revision: 281434
URL: https://svnweb.freebsd.org/changeset/base/281434

Log:
  Only add -fPIC to CFLAGS and -Wl,-znocombreloc to LDFLAGS on x86, they
  shouldn't be used on arm.

Modified:
  head/sys/boot/efi/loader/Makefile
  head/sys/boot/efi/loader/arch/amd64/Makefile.inc
  head/sys/boot/efi/loader/arch/i386/Makefile.inc

Modified: head/sys/boot/efi/loader/Makefile
==============================================================================
--- head/sys/boot/efi/loader/Makefile   Sat Apr 11 10:21:26 2015        
(r281433)
+++ head/sys/boot/efi/loader/Makefile   Sat Apr 11 10:36:48 2015        
(r281434)
@@ -29,7 +29,6 @@ SRCS= autoload.c \
 .PATH: ${.CURDIR}/../../i386/libi386
 .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc"
 
-CFLAGS+=       -fPIC
 CFLAGS+=       -I${.CURDIR}
 CFLAGS+=       -I${.CURDIR}/arch/${MACHINE_CPUARCH}
 CFLAGS+=       -I${.CURDIR}/../include
@@ -72,7 +71,7 @@ FILES=        loader.efi
 FILESMODE_loader.efi=  ${BINMODE}
 
 LDSCRIPT=      ${.CURDIR}/arch/${MACHINE_CPUARCH}/ldscript.${MACHINE_CPUARCH}
-LDFLAGS=       -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared -Wl,-znocombreloc
+LDFLAGS+=      -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared
 
 CLEANFILES=    vers.c loader.efi
 

Modified: head/sys/boot/efi/loader/arch/amd64/Makefile.inc
==============================================================================
--- head/sys/boot/efi/loader/arch/amd64/Makefile.inc    Sat Apr 11 10:21:26 
2015        (r281433)
+++ head/sys/boot/efi/loader/arch/amd64/Makefile.inc    Sat Apr 11 10:36:48 
2015        (r281434)
@@ -8,3 +8,6 @@ SRCS+=  amd64_tramp.S \
 .PATH: ${.CURDIR}/../../i386/libi386
 SRCS+= nullconsole.c \
        comconsole.c
+
+CFLAGS+=       -fPIC
+LDFLAGS+=      -Wl,-znocombreloc

Modified: head/sys/boot/efi/loader/arch/i386/Makefile.inc
==============================================================================
--- head/sys/boot/efi/loader/arch/i386/Makefile.inc     Sat Apr 11 10:21:26 
2015        (r281433)
+++ head/sys/boot/efi/loader/arch/i386/Makefile.inc     Sat Apr 11 10:36:48 
2015        (r281434)
@@ -8,3 +8,6 @@ SRCS+=  start.S \
 .PATH: ${.CURDIR}/../../i386/libi386
 SRCS+= nullconsole.c \
        comconsole.c
+
+CFLAGS+=       -fPIC
+LDFLAGS+=      -Wl,-znocombreloc
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to