public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Thanks, Ian!
@ 2004-03-07  4:49 Chao Liu
  2004-03-09 23:28 ` Funny compile error while building ipfilters for Solaris Mario V Nigrovic; RVVK40
  0 siblings, 1 reply; 2+ messages in thread
From: Chao Liu @ 2004-03-07  4:49 UTC (permalink / raw)
  To: gcc-help

Thanks, Ian! I've got it done with gcc-2.95.3. In fact, I am a newbie on
Linux. I found your essay "The GNU configure and build system" is
very helpful. In fact, it is the just thing I am hoping for :-)

thanks,
Chao

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Funny compile error while building ipfilters for Solaris.
  2004-03-07  4:49 Thanks, Ian! Chao Liu
@ 2004-03-09 23:28 ` Mario V Nigrovic; RVVK40
  0 siblings, 0 replies; 2+ messages in thread
From: Mario V Nigrovic; RVVK40 @ 2004-03-09 23:28 UTC (permalink / raw)
  To: gcc-help

Folks -

    I get a funny error while trying to build ipfilters for Solaris.  It
seems that that package tries to use a compilation flag that is broken.  It's
something with the specs, I think; anyway here's what happens:


$$$$ cat trial.c
#include <stdio.h>

main()
{
    printf("Sizeof int:  %d\n", sizeof (int));
    printf("Sizeof long: %d\n", sizeof (long));
    printf("Sizeof *:    %d\n", sizeof (void *));
}
$$$$ gcc -o trial64 -m64 -mcmodel=medlow trial.c
/usr/lib/ld/sparcv9/map.below4G: file not recognized: File format not recognized
collect2: ld returned 1 exit status
$$$$ gcc -o trial64 -m64 trial.c
$$$$ ./trial64
Sizeof int:  4
Sizeof long: 8
Sizeof *:    8


    More detail:


$$$$ gcc -v
Reading specs from /usr/gnu/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.3.1/specs
Configured with: /media/gnu/gcc-3.3.1/configure --prefix=/tools/GNU/005/SunOS_5.8 --disable-nls --with-gnu-as --with-as=/tools/GNU/005/SunOS_5.8/bin/as --with-gnu-ld --with-ld=/tools/GNU/005/SunOS_5.8/bin/ld
Thread model: posix
gcc version 3.3.1


    From the specs file:


*link_arch64:
%{mcmodel=medlow:-M /usr/lib/ld/sparcv9/map.below4G}    %{G:-G}    %{YP,*}    %{R*}    %{compat-bsd:      %{!YP,*:%{p|pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/libp/sparcv9:/usr/lib/sparcv9}        %{!p:%{!pg:-Y P,/usr/ucblib/sparcv9:/usr/lib/sparcv9}}}      -R /usr/ucblib}    %{!compat-bsd:      %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/sparcv9:/usr/lib/sparcv9}        %{!p:%{!pg:-Y P,/usr/lib/sparcv9}}}}


    The map.below4G file is SUN's so I won't paste it here, but it's basically
comments and one line to (I guess) set the start address of the text segment.
Currently, I've fixed the ipfilters script by commenting out this part of
the buildsunos script, but it's been there for several versions.

    I think I posted this problem to the binutils group some time ago, and
we investigated some changes to the specs file, but they never worked.  So
I took the -mcmodel out and things work.  But I'm concerned about this flag;
it seems to be there for use by the Sun linker, yet if I'm using GNU ld, then
it just gets in the way.  Can the specs file be made smarter to avoid this
problem?  Is there something similar which needs to be set-up so that the
it will work for either ld?

					Mario
-- 
Whoever fights monsters should see to it that in the process
he does not become a monster.  -- Nietzsche

Poppy says: [x] GBI  [] Internal Use Only  [] Confidential Proprietary
Mommy says: [x] wash your face [x] brush your teeth [x] watch yo' mouth

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-09 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-07  4:49 Thanks, Ian! Chao Liu
2004-03-09 23:28 ` Funny compile error while building ipfilters for Solaris Mario V Nigrovic; RVVK40

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).