Hello,

(please note that this is a modified repost from the gcc-help list - I was told 
that the gcc list is a better place for my questions)

I have been trying to port a reasonably recent version of gcc to a m68k NeXT 
running NEXTSTEP 3.3.  After many struggles and lots of help from the m68k 
debian ports team I was finally able to complete the bootstrap process on 
gcc-4.2.4.  The stage 2 and stage 3 compiler appear to be working reasonably 
well and producing good code, but they generate an endless list of warnings 
that do not occur with the stage 1 compiler.  Here is some sample code and the 
warnings with various gcc options:

> #include <math.h>
> #include <stdio.h>
> 
> int main() {
>  printf("%lf\n", acos(0.5));
>  return 0;
> }

nextstep[Tests]$xgcc acos_test.c -o acos_test
<built-in>:0: warning: '__builtin_acos' used but never defined
/NextDeveloper/Headers/ansi/math.h:55: warning: 'acos' used but never defined
<built-in>:0: warning: '__builtin_printf' used but never defined
/NextDeveloper/Headers/ansi/stdio.h:123: warning: 'printf' used but never 
defined

nextstep[Tests]$xgcc acos_test.c -o acos_test -O 

> #include <math.h>
> #include <stdio.h>
> 
> int main() {
>  printf("%lf\n",  __builtin_acos(0.5));
>  return 0;
> }

nextstep[Tests]$xgcc builtin_acos_test.c -o builtin_acos_test
<built-in>:0: warning: '__builtin_acos' used but never defined
/NextDeveloper/Headers/ansi/math.h:55: warning: 'acos' used but never defined
<built-in>:0: warning: '__builtin_printf' used but never defined
/NextDeveloper/Headers/ansi/stdio.h:123: warning: 'printf' used but never 
defined

nextstep[Tests]$xgcc builtin_acos_test.c -o builtin_acos_test -O   

nextstep[Tests]$xgcc builtin_acos_test.c -o builtin_acos_test -Wall
<built-in>:0: warning: '__builtin_acos' used but never defined
/NextDeveloper/Headers/ansi/math.h:55: warning: 'acos' used but never defined
<built-in>:0: warning: '__builtin_acosf' declared 'static' but never defined
<built-in>:0: warning: 'acosf' declared 'static' but never defined
<built-in>:0: warning: '__builtin_acosh' declared 'static' but never defined
/NextDeveloper/Headers/ansi/math.h:24: warning: 'acosh' declared 'static' but 
never defined
<built-in>:0: warning: '__builtin_acoshf' declared 'static' but never defined
<built-in>:0: warning: 'acoshf' declared 'static' but never defined
<built-in>:0: warning: '__builtin_acoshl' declared 'static' but never defined
<built-in>:0: warning: 'acoshl' declared 'static' but never defined
<built-in>:0: warning: '__builtin_acosl' declared 'static' but never defined
<built-in>:0: warning: 'acosl' declared 'static' but never defined
<built-in>:0: warning: '__builtin_asin' declared 'static' but never defined
/NextDeveloper/Headers/ansi/math.h:56: warning: 'asin' declared 'static' but 
never defined
<built-in>:0: warning: '__builtin_asinf' declared 'static' but never defined
<built-in>:0: warning: 'asinf' declared 'static' but never defined
<built-in>:0: warning: '__builtin_asinh' declared 'static' but never defined
/NextDeveloper/Headers/ansi/math.h:23: warning: 'asinh' declared 'static' but 
never defined
^C (I aborted here since xgcc spits out an endless list of similar warnings, 
but the resultant executable works)

nextstep[Tests]$xgcc builtin_acos_test.c -o builtin_acos_test -O -Wall
<built-in>:0: warning: '__builtin_acos' declared 'static' but never defined
/NextDeveloper/Headers/ansi/math.h:55: warning: 'acos' declared 'static' but 
never defined
<built-in>:0: warning: '__builtin_acosf' declared 'static' but never defined
<built-in>:0: warning: 'acosf' declared 'static' but never defined
<built-in>:0: warning: '__builtin_acosh' declared 'static' but never defined
/NextDeveloper/Headers/ansi/math.h:24: warning: 'acosh' declared 'static' but 
never defined
<built-in>:0: warning: '__builtin_acoshf' declared 'static' but never defined
<built-in>:0: warning: 'acoshf' declared 'static' but never defined
<built-in>:0: warning: '__builtin_acoshl' declared 'static' but never defined
<built-in>:0: warning: 'acoshl' declared 'static' but never defined
<built-in>:0: warning: '__builtin_acosl' declared 'static' but never defined
<built-in>:0: warning: 'acosl' declared 'static' but never defined
<built-in>:0: warning: '__builtin_asin' declared 'static' but never defined
/NextDeveloper/Headers/ansi/math.h:56: warning: 'asin' declared 'static' but 
never defined
<built-in>:0: warning: '__builtin_asinf' declared 'static' but never defined
<built-in>:0: warning: 'asinf' declared 'static' but never defined
<built-in>:0: warning: '__builtin_asinh' declared 'static' but never defined
/NextDeveloper/Headers/ansi/math.h:23: warning: 'asinh' declared 'static' but 
never defined
^C (I aborted here since xgcc spits out an endless list of similar warnings, 
but the resultant executable works)

Similar warnings occur on every source file for built-in function declarations 
and functions declared in the included header files.   I am completely 
perplexed that the stage1 compiler is working fine with no warning, yet stage2 
and stage3 generate the warnings.  The target configuration for all three 
stages is obviously identical and the build options are almost identical.  And 
all three stages generate executables that appear to work just fine.  I am 
obviously missing something in the target configuration but after reviewing the 
GCC Internals document I could not find anything obvious.

I am struggling to identify the root cause of this issue and would very much 
appreciate any assistance, or even pointers on where to start looking.  
Tinkering with software is only a hobby for me and my knowledge runs out pretty 
rapidly...

t-rexky

Reply via email to