build: Handle gcc with --pie-by-default.

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.
This commit is contained in:
Jan Nieuwenhuizen 2019-07-06 13:57:30 +02:00
parent fca5f11dd4
commit 479bf10878
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
3 changed files with 7 additions and 0 deletions

View file

@ -52,6 +52,7 @@ debug=
#debug=-g
CFLAGS="
-static
$debug
"

View file

@ -30,6 +30,7 @@ fi
CFLAGS=
if test $mes_libc = mes; then
CFLAGS="
-static
-nostdinc
-nostdlib
-fno-builtin

View 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)