build: Handle gcc with --pie-by-default.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sat, 6 Jul 2019 11:57:30 +0000 (13:57 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sat, 6 Jul 2019 11:57:30 +0000 (13:57 +0200)
This fixes upgrading to debian-hurd-20190220.img.

* build-aux/build.sh.in (CFLAGS): Add -static.  Fixes using gcc
compiled with --pie-by-default
* build-aux/check.sh.in (CFLAGS): Likewise.
* module/mescc.scm (parse-opts): Ignore -no-pie, -static.

build-aux/build.sh.in
build-aux/check.sh.in
module/mescc.scm

index 7bfe3fe60034a9f77e954c90d2751a0b20497f74..017a562e71c494fd3f8c0ab0f1a7c3b7f95222e1 100644 (file)
@@ -52,6 +52,7 @@ debug=
 #debug=-g
 
 CFLAGS="
+-static
 $debug
 "
 
index 2ecac1b29d8c3036f128b942fdacecd4d2ce2063..d5435451bff0141f1a4a040d7fa3e55f0c488ad4 100644 (file)
@@ -30,6 +30,7 @@ fi
 CFLAGS=
 if test $mes_libc = mes; then
     CFLAGS="
+-static
 -nostdinc
 -nostdlib
 -fno-builtin
index ec8ececc48e37589f2b350e8bb78d74ec539b5c7..4ba658e4e022030b2eac10fa3d52097d973a7957 100644 (file)
@@ -73,6 +73,7 @@
             (nostdinc)
             (nostdlib)
             (preprocess (single-char #\E))
+            (static)
             (std (value #t))
             (output (single-char #\o) (value #t))
             (optimize (single-char #\O) (value #t))
@@ -117,7 +118,9 @@ Usage: mescc [OPTION]... FILE...
 
 Ignored for GCC compatibility
   -fno-builtin
+  -no-pie
   -nostdinc
+  -static
 
 Environment variables:
 
@@ -135,10 +138,12 @@ General help using GNU software: <http://gnu.org/gethelp/>
 (define (mescc:main args)
   (let* ((single-dash-options '("-dumpmachine"
                                 "-fno-builtin"
+                                "-no-pie"
                                 "-nodefaultlibs"
                                 "-nostartfiles"
                                 "-nostdinc"
                                 "-nostdlib"
+                                "-static"
                                 "-std"))
          (args (map (lambda (o)
                       (if (member o single-dash-options) (string-append "-" o)