commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnumach] 02/02: Fix build on i386 with now-default PIE


From: Samuel Thibault
Subject: [gnumach] 02/02: Fix build on i386 with now-default PIE
Date: Mon, 24 Oct 2016 19:14:49 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch master
in repository gnumach.

commit 25d3de3af9b35838ae51c793b803f2a5361944d6
Author: Samuel Thibault <address@hidden>
Date:   Mon Oct 24 21:10:11 2016 +0200

    Fix build on i386 with now-default PIE
    
      * git-LDFLAGS: New patch to make build system take LDFLAGS into account.
      * rules:
        - Pass -no-pie -fno-PIE to compiler and -no-pie to linker to fix build 
on
        i386.
        - Fix passing flags to dbg variants.
---
 debian/changelog           |  4 +++-
 debian/patches/git-LDFLAGS | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series      |  1 +
 debian/rules               |  2 +-
 4 files changed, 57 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6ee08d7..8e3e401 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,9 @@
 gnumach (2:1.7+git20161023-2) UNRELEASED; urgency=medium
 
+  * git-LDFLAGS: New patch to make build system take LDFLAGS into account.
   * rules:
-    - Pass -no-pie to compiler to fix build on i386.
+    - Pass -no-pie -fno-PIE to compiler and -no-pie to linker to fix build on
+    i386.
     - Fix passing flags to dbg variants.
 
  -- Samuel Thibault <address@hidden>  Mon, 24 Oct 2016 19:51:48 +0200
diff --git a/debian/patches/git-LDFLAGS b/debian/patches/git-LDFLAGS
new file mode 100644
index 0000000..4f02d19
--- /dev/null
+++ b/debian/patches/git-LDFLAGS
@@ -0,0 +1,52 @@
+commit fd2c9fee9ca6c6452baed86ed61b03cdea5f8628
+Author: Samuel Thibault <address@hidden>
+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 <address@hidden>
+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)". ; \
diff --git a/debian/patches/series b/debian/patches/series
index 418767b..03b130d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 20_FP_NO.patch
 50_initrd.patch
 70_dde.patch
+git-LDFLAGS
diff --git a/debian/rules b/debian/rules
index 2af77e4..6f172cb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -41,7 +41,7 @@ D_XEN_DBG := $(D)-xen-dbg
 DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
-CFLAGS = -Wall -g -pipe -fno-strict-aliasing -no-pie
+CFLAGS = -Wall -g -pipe -fno-strict-aliasing -no-pie -fno-PIE -fno-pie
 LDFLAGS = -no-pie
 
 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/gnumach.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]