This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crossgcc building problem


On 05/01/2002 08:43:21 PM ZE3 Kai Ruottu wrote:

>in order to produce the shared 'libgcc_s.so'... But the options used are
for
>the native Sun-made linker, not for the GNU 'ld'. The 'libgcc.map' will
not
>be understood as a parameter for '-M' but as a separate file name...

That was the problem. RT'd the FM, Solved it, Thanks :-))

> The 'libgcc.map'-problem was handled a week or so ago... The problems
with the
>'_ctype_' too (Wrong 'newlib'-related C++-headers were symlinked, not the
common
>solaris7 & solaris8 ones). And so on... Read the archives, please... And
if the
>double $target in the paths was a mistake, as I would assume, just remove
it when
>reconfiguring after a 'make distclean'...

Read archives, encountered ctype problem after solving former problem,
fixed it as solution in archives dictates, works, thanks again :-)

BUT I'm still not out of the woods though.

I'm now attempting to compile either newlib-1.9.0 or glibc-1.09.1

For now, I opted for newlib, doing this:
a. added the /.../cross-compiler-dir/bin to my tcsh path
b. configured as follows:

13:51|[May] mikisu:/usr/src/cross2/newlib-1.9.0/build#../configure
--target=sparc-sun-solaris2.7 --prefix=/usr/local/cpl/sparc-sun-solaris2.7
-v

Configuring for a sparc-sun-solaris2.8 host.
Created "Makefile" in /usr/share/src/cross2/newlib-1.9.0/build using
"mh-frag"
./config.status is unchanged
Configuring texinfo...
No configuration information in texinfo
Configuring etc...
loading cache ../config.cache
checking for a BSD compatible install... ../../etc/../install-sh -c
creating ./config.status
creating Makefile

c. ran 'make all':
.
.
.
make[2]: Entering directory
`/usr/share/src/cross2/newlib-1.9.0/build/sparc-sun-solaris2.7/newlib/libc'
Making all in stdlib
make[3]: Entering directory
`/usr/share/src/cross2/newlib-1.9.0/build/sparc-sun-solaris2.7/newlib/libc/stdlib'
sparc-sun-solaris2.7-gcc
-B/usr/share/src/cross2/newlib-1.9.0/build/sparc-sun-solaris2.7/newlib/
-isystem
/usr/share/src/cross2/newlib-1.9.0/build/sparc-sun-solaris2.7/newlib/targ-include

-isystem /usr/share/src/cross2/newlib-1.9.0/newlib/libc/include -DPACKAGE=\
"newlib\" -DVERSION=\"1.9.0\"  -I. -I../../../../../newlib/libc/stdlib  -O2
-DMALLOC_ALIGNMENT=8 -DMISSING_SYSCALL_NAMES -I../../targ-include
-I../../../../../newlib/libc/../libc/include -fno-builtin      -g -O2 -c
../../../../../newlib/libc/stdlib/strtol.c
In file included from ../../../../../newlib/libc/include/sys/reent.h:14,
                 from ../../../../../newlib/libc/include/sys/errno.h:11,
                 from ../../../../../newlib/libc/include/errno.h:1,
                 from ../../../../../newlib/libc/stdlib/strtol.c:123:
../../../../../newlib/libc/include/time.h:28:1: warning: "CLK_TCK"
redefined
/usr/local/cpl/sparc-sun-solaris2.7/lib/gcc-lib/sparc-sun-solaris2.7/3.0.4/include/syslimits.h:286:1:

warning: this is the location of the previous definition
In file included from ../../../../../newlib/libc/include/time.h:32,
                 from ../../../../../newlib/libc/include/sys/reent.h:14,
                 from ../../../../../newlib/libc/include/sys/errno.h:11,
                 from ../../../../../newlib/libc/include/errno.h:1,
                 from ../../../../../newlib/libc/stdlib/strtol.c:123:
../../../../../newlib/libc/include/sys/types.h:64: conflicting types for
`clock_t'
/usr/local/cpl/sparc-sun-solaris2.7/lib/gcc-lib/sparc-sun-solaris2.7/3.0.4/include/syslimits.h:282:

previous declaration of `clock_t'
make[3]: *** [strtol.o] Error 1
make[3]: Leaving directory
`/usr/share/src/cross2/newlib-1.9.0/build/sparc-sun-solaris2.7/newlib/libc/stdlib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/usr/share/src/cross2/newlib-1.9.0/build/sparc-sun-solaris2.7/newlib/libc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/usr/share/src/cross2/newlib-1.9.0/build/sparc-sun-solaris2.7/newlib'
make: *** [all-target-newlib] Error 2

[...drop-dead...]
This time, I also looked through crossgcc archives and newlib archives, and
dug up nothing save one long-forgotten thread somewhere that never got
answered.

My newly-made gcc's gcc-lib seems to collide with newlib. how come?
Help? :-)

--
Miki Shapiro <mikis@aAladdin.com>
Unixophilic Software Developer
Aladdin Knowledge Systems
---------------------------------------------
Tel: +972-(4)-8811433  ICQ: 3EE853
---------------------------------------------
If at first you don't succeed...
... SkyDiving is probbably not for you.


On 05/01/2002 08:43:21 PM ZE3 Kai Ruottu wrote:
>
>miki.shapiro@eAladdin.com wrote:
>>
>> Hi
>>
>> I'm attempting to build sparc-sun-solaris2.7 targeted gcc-3.0.4 that
will
>> run on sparc-sun-solaris2.8.
>> I have a local gcc 2.95.2 installed from a binary package.
>>
>> The problem: when linking the gcc binary (if I understand correctly) -
it
>> uses the cross-platform linker instead of the local one, thereby making
>> a cross-compil*ed* gcc binary, whereas I want a cross-compil*ing* LOCAL
gcc
>> binary.
>
> In your log I didn't see anything like that, it only tried to use the new
>crosscompiler to build the shared 'libgcc_s.so' for the crosscompiler...
>>
>> I have:
>> read the FAQ, and a couple more MINI-howtos, so if you send me RTFM'ing,
>> sent me to pinpoint locations :-)
>
> The full GCC-manual, "Using and Porting..." would have been the needed
RTFM...
>No FAQs, no howtos, nothing else needed if only understanding that the
default
>$prefix, '/usr/local', can be substituted by something own...
>
> But the Solaris2-target needs some extra info, so please browse the
messages
>on the archive for this list about producing a solaris2.8 targeted
toolchain
>for Linux-host (or something). The ideas are just the same...
>
>> c. configured gcc-3.0.4 as follows:
>> ./configure --target=sparc-sun-solaris2.7
>> --prefix=/usr/local/cpl/sparc-sun-solaris2.7 -v
>> --with-headers=/usr/local/cpl/sol7/include
>> --with-libs=/usr/local/cpl/sol7/lib
>>
>> NOTE: I copied (with subdirs) all libraries and headers from a
>> Solaris7/SPARC machine to this Solaris8/SPARC machine to
>> /usr/local/cpl/sol7/lib and /usr/local/cpl/sol7/include
>
> Why you didn't simply copy these directly into the '$prefix/$target' ?,
>ie. into:
>
>   /usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/lib
>and
>   /usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/include
>
>Ok, I didn't understand why you will need the double
'sparc-sun-solaris2.7'
>here...
>
> Anyway two important '--with-...' options were replaced with two
unnecessary
>ones, sigh... (See later)
>
>> At the very end, here's what I got:
>> .
>> mv tmp-libgcc.map libgcc.map
>> /usr/share/src/cross2/gcc-3.0.4/gcc/xgcc
>
> This is the driver for the just-built new crosscompiler...
>
>> -B/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/bin/
>> -B/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/lib/
>> -isystem
/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/include
>
>and it tries to use the stuff in the $prefix/$target/... (bin, lib,
include)
>
>> -shared -nodefaultlibs -Wl,-h,libgcc_s.so.1 -Wl,-z,text -Wl,-z,defs
>> -Wl,-M,libgcc.map -o libgcc_s.so
>
>in order to produce the shared 'libgcc_s.so'... But the options used are
for
>the native Sun-made linker, not for the GNU 'ld'. The 'libgcc.map' will
not
>be understood as a parameter for '-M' but as a separate file name...
>
>>
/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/bin/ld:libgcc.map:
>> file format not recognized; treating as linker script
>>
/usr/local/cpl/sparc-sun-solaris2.7/sparc-sun-solaris2.7/bin/ld:libgcc.map:1:

>> parse error
>
>And the reason is that you forgot to tell this during 'configure'... You
SHOULD
>have used the '--with-gnu-as --with-gnu-ld' because you really will use
them,
>not the Sun-made tools...
>
>> Ideas?
>
> The 'libgcc.map'-problem was handled a week or so ago... The problems
with the
>'_ctype_' too (Wrong 'newlib'-related C++-headers were symlinked, not the
common
>solaris7 & solaris8 ones). And so on... Read the archives, please... And
if the
>double $target in the paths was a mistake, as I would assume, just remove
it when
>reconfiguring after a 'make distclean'...
>
> You also seemed to configure in the source directory, which isn't
recommended
>nowadays... Please make a separate 'build' directory, for instance a
'gcc-3.0.4/build'
>(a subdir into the main source directory) and then run '../configure
<parameters>'
>from it...
>
>Cheers, Kai
>
>


******************************* IMPORTANT ! **********************************
The content of this email and any attachments are confidential and intended 
for the named recipient(s) only.

If you have received this email in error please notify the sender immediately.
Do not disclose the content of this message or make copies.

This email was scanned by eSafe Mail for viruses, vandals  and other
malicious content.
******************************************************************************


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]