commit fd2c9fee9ca6c6452baed86ed61b03cdea5f8628
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Oct 24 20:11:15 2016 +0200

    Fix taking LDFLAGS into account
    
    * Makefile.am (gnumach_o_LINK, gnumach_LINK): Add $(LDFLAGS).

diff --git a/Makefile.am b/Makefile.am
index 50ff6b6..ff23c32 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -156,7 +156,7 @@ include doc/Makefrag.am
 # program `gnumach.o' that is then later used again as an object file.)
 gnumach_o_SOURCES =
 # TODO.  ``-u _start''.  System dependent?
-gnumach_o_LINK = $(LD) -u _start -r -o $@
+gnumach_o_LINK = $(LD) $(LDFLAGS) -u _start -r -o $@
 noinst_PROGRAMS += \
 	gnumach.o
 
@@ -181,7 +181,7 @@ clib-routines.o: gnumach-undef gnumach-undef-bad
 	then echo "Please install a 32bit libc without multiarch support (on Debian systems, the libc6-dev:i386 package containing /usr/lib/i386-linux-gnu/libc.a)". ; \
 	false ; fi
 
-gnumach_LINK = $(LD) $(LINKFLAGS) $(gnumach_LINKFLAGS) -o $@
+gnumach_LINK = $(LD) $(LDFLAGS) $(LINKFLAGS) $(gnumach_LINKFLAGS) -o $@
 gnumach_LDADD = gnumach.o clib-routines.o
 
 #

commit 0842c5e85ab2b049af7b44ce2196362bdce80c97
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Oct 24 21:05:18 2016 +0200

    Fix taking LDFLAGS into account
    
    * Makefile.am (clib-routines.o): Add $(LDFLAGS) to link command.

diff --git a/Makefile.am b/Makefile.am
index ff23c32..67252db 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -175,7 +175,7 @@ MOSTLYCLEANFILES += gnumach-undef-bad
 clib-routines.o: gnumach-undef gnumach-undef-bad
 	$(AM_V_at) if test -s gnumach-undef-bad; \
 	then cat gnumach-undef-bad; exit 2; else true; fi
-	$(AM_V_CCLD) $(CCLD) -nostdlib -nostartfiles -r -static \
+	$(AM_V_CCLD) $(CCLD) $(LDFLAGS) -nostdlib -nostartfiles -r -static \
 	  -o $@ `sed 's/^/-Wl,-u,/' < $<` -x c /dev/null -lc -lgcc
 	@if nm $@ | grep __init_cpu_features; \
 	then echo "Please install a 32bit libc without multiarch support (on Debian systems, the libc6-dev:i386 package containing /usr/lib/i386-linux-gnu/libc.a)". ; \
