diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-02-01 01:42:36 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-02-07 21:56:50 +0100 |
commit | 950e23d1a5af3db635c9fea67a367326d847278e (patch) | |
tree | 07d4573e660abf78c35df2334e9de027d2436cc5 | |
parent | 949a29adb9f400ebdc15aed2dd874c17ffa839cb (diff) | |
download | sparse-950e23d1a5af3db635c9fea67a367326d847278e.tar.gz |
cgcc: teach cgcc about Hurd/GNU
cgcc fails if it doesn't know about the system/OS as
returned by `uname -s`. This creates a build failure for
Debian since Hurd is one of their non-official 'ports'
but unknown to cgcc.
So, teach cgcc about 'GNU' (the OS/system name returned
on Hurd) and add the few predefines used to identify it.
Reported-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rwxr-xr-x | cgcc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -274,6 +274,9 @@ sub add_specs { } elsif ($spec eq 'darwin') { return ' -D__APPLE__=1 -D__MACH__=1'; + } elsif ($spec eq 'gnu') { # Hurd + return &add_specs ('unix') . # So, GNU is Unix, uh? + ' -D__GNU__=1 -D__gnu_hurd__=1 -D__MACH__=1'; } elsif ($spec eq 'unix') { return ' -Dunix=1 -D__unix=1 -D__unix__=1'; } elsif ( $spec =~ /^cygwin/) { |