Author: marcel
Date: Thu Nov 29 03:48:39 2012
New Revision: 243664
URL: http://svnweb.freebsd.org/changeset/base/243664

Log:
  Fix LINT build for arm: NOTES defines LDFLAGS by way of a make option
  but LDFLAGS is not (yet) passed on to the linker (via SYSTEM_LD et al).
  Do so now. As such, any kernel configuration can now define linker
  flags by setting LDFLAGS as normal and not have to revert to hacks
  like setting DEBUG for flags that do not relate to debugging (see
  sys/powerpc/conf/MPC85XX).

Modified:
  head/sys/conf/Makefile.arm
  head/sys/conf/kern.pre.mk

Modified: head/sys/conf/Makefile.arm
==============================================================================
--- head/sys/conf/Makefile.arm  Thu Nov 29 00:32:03 2012        (r243663)
+++ head/sys/conf/Makefile.arm  Thu Nov 29 03:48:39 2012        (r243664)
@@ -43,7 +43,7 @@ STRIP_FLAGS = -S
 CFLAGS += -mno-apcs-frame
 .endif
 
-SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader \
+SYSTEM_LD_ = ${LD} -Bdynamic -T ldscript.$M.noheader ${LDFLAGS} \
          -warn-common -export-dynamic -dynamic-linker /red/herring -o \
           ${FULLKERNEL}.noheader -X ${SYSTEM_OBJS} vers.o
 SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript.$M\

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk   Thu Nov 29 00:32:03 2012        (r243663)
+++ head/sys/conf/kern.pre.mk   Thu Nov 29 03:48:39 2012        (r243664)
@@ -167,7 +167,7 @@ SYSTEM_DEP= Makefile ${SYSTEM_OBJS}
 SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS}
 SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o}
 SYSTEM_OBJS+= hack.So
-SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} --no-warn-mismatch \
+SYSTEM_LD= @${LD} -Bdynamic -T ${LDSCRIPT} ${LDFLAGS} --no-warn-mismatch \
        -warn-common -export-dynamic -dynamic-linker /red/herring \
        -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
 SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to