stdc-predef.h and musl-gcc

Submitted by Jens Gustedt on Oct. 29, 2018, 7:20 p.m.

Details

Message ID 20181029202045.13acb5ab@inria.fr
State New
Series "stdc-predef.h and musl-gcc"
Headers show

Commit Message

Jens Gustedt Oct. 29, 2018, 7:20 p.m.
Hi,
when used with the musl-gcc interface, we are missing some of the
standard macros. A simple add to the spec file for preloading
stdc-predef.h solves the problem for me.
Thanks
Jens

Patch hide | download patch | download mbox

diff --git a/tools/musl-gcc.specs.sh b/tools/musl-gcc.specs.sh
index 30492574..69bb1ff4 100644
--- a/tools/musl-gcc.specs.sh
+++ b/tools/musl-gcc.specs.sh
@@ -8,7 +8,7 @@  cat <<EOF
 -nostdinc -isystem $incdir -isystem include%s %(old_cpp_options)
 
 *cc1:
-%(cc1_cpu) -nostdinc -isystem $incdir -isystem include%s
+%(cc1_cpu) -nostdinc -isystem $incdir  -imacros stdc-predef.h -isystem include%s
 
 *link_libgcc:
 -L$libdir -L .%s

Comments

Rich Felker Nov. 2, 2018, 4:10 p.m.
On Mon, Oct 29, 2018 at 08:20:45PM +0100, Jens Gustedt wrote:
> Hi,
> when used with the musl-gcc interface, we are missing some of the
> standard macros. A simple add to the spec file for preloading
> stdc-predef.h solves the problem for me.
> Thanks
> Jens
> 
> -- 
> :: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
> :: ::::::::::::::: office Strasbourg : +33 368854536   ::
> :: :::::::::::::::::::::: gsm France : +33 651400183   ::
> :: ::::::::::::::: gsm international : +49 15737185122 ::
> :: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::

> diff --git a/tools/musl-gcc.specs.sh b/tools/musl-gcc.specs.sh
> index 30492574..69bb1ff4 100644
> --- a/tools/musl-gcc.specs.sh
> +++ b/tools/musl-gcc.specs.sh
> @@ -8,7 +8,7 @@ cat <<EOF
>  -nostdinc -isystem $incdir -isystem include%s %(old_cpp_options)
>  
>  *cc1:
> -%(cc1_cpu) -nostdinc -isystem $incdir -isystem include%s
> +%(cc1_cpu) -nostdinc -isystem $incdir  -imacros stdc-predef.h -isystem include%s
>  
>  *link_libgcc:
>  -L$libdir -L .%s

Hmm, I suppose -nostdinc is what's suppressing it from happening by
default? Is there a reason for the two spaces above?

Rich