DragonFly-2.3.0.758.ge1da68 master Makefile.inc1 Makefile_upgrade.inc gnu/lib/csu Makefile.csu gnu/lib/gcc34/csu Makefile gnu/lib/gcc41/csu Makefile lib Makefile lib/csu Makefile lib/csu/amd64 Makefile.csu lib/csu/i386 Makefile.csu
Sepherosa Ziehau
sepherosa at gmail.com
Mon Apr 20 02:27:57 PDT 2009
On Mon, Apr 20, 2009 at 4:15 PM, Hasso Tepper <hasso at estpak.ee> wrote:
> Matthew Dillon wrote:
>> Woa. Hold on. That locks us into a common set of crt files
>> which could cause problems if we ever wanted integrate other
>> compilers into the system if they needed different ones.
>
> I don't think that these are specific to compilers. All systems except
> DragonFly have these in libc and other compilers (like pcc) don't have
> these at all. I wouldn't wonder if these would be in gcc just to support
> ancient systems/platforms/etc.
We used our own crt* implementation before switching to gcc4, however
our crt* implementation causes various trouble with gcc4. Linux seems
to assume crt1, crti and crtn is generic (they are in /usr/lib), rest
of the crt* come with gcc4.
Following is what happens on Linux with gcc4:
cray:/tmp> gcc -v main.o -o test
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
/usr/lib/gcc/i486-linux-gnu/4.1.2/collect2 --eh-frame-hdr -m elf_i386
-dynamic-linker /lib/ld-linux.so.2 -o test
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crti.o
/usr/lib/gcc/i486-linux-gnu/4.1.2/crtbegin.o
-L/usr/lib/gcc/i486-linux-gnu/4.1.2
-L/usr/lib/gcc/i486-linux-gnu/4.1.2
-L/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib -L/lib/../lib
-L/usr/lib/../lib main.o -lgcc --as-needed -lgcc_s --no-as-needed -lc
-lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc/i486-linux-gnu/4.1.2/crtend.o
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crtn.o
On dfly:
leaf:/home/sephe> cc -v main.o -o test
Using built-in specs.
Target:
Configured with: DragonFly/i386 system compiler
Thread model: posix
gcc version 4.1.2 (DragonFly)
ld -V -dynamic-linker /usr/libexec/ld-elf.so.2 -o test
/usr/lib/gcc41/crt1.o /usr/lib/gcc41/crti.o /usr/lib/gcc41/crtbegin.o
main.o -L/usr/lib/gcc41 -rpath /usr/lib/gcc41 -rpath-link
/usr/lib/gcc41 -rpath /usr/lib -rpath-link /usr/lib -lgcc -lc -lgcc
/usr/lib/gcc41/crtend.o /usr/lib/gcc41/crtn.o
GNU ld version 2.17 [DragonFly] 2007-04-12
Supported emulations:
elf_i386
Best Regards,
sephe
--
Live Free or Die
More information about the Commits
mailing list