[geeks] Not using crt?.o on Solaris

Jonathan C. Patschke jp at celestrion.net
Wed Aug 20 09:10:33 CDT 2003


I'm sure this is -somewhere- in the giant cc(1) manual page, but what
option can I pass to Sun's compiler to not link against crt?.o?
-xnolib doesn't seem to get the point across.

In other news, some folks simply shouldn't be allowed to release
software on an unsuspecting public.  The actual scenario is this:
$software has a -lot- of source files.  In order to keep things neat,
the maintaininer broke the source files into separate directories.  Each
file gets compiled to a .o, and the linker is asked to make a
"relocatable object" from those .o files.  This is almost like making a
static library, but without all the header information.

Later, the linker is asked to link all those relocatable objects into
the main executable.  cc, even when told '-r -xnolib' links in crt.o for
each of the .o files, so there are lots of symbol conflicts.  I don't
think -G is an answer, because the output isn't a dynamic library.

Now, why didn't the dummy just use ar to make a static libraries?

-- 
Jonathan Patschke   )  "We're Texans.  We figure out ways to do these
Elgin, TX          (    things..."                    --Bill Bradford



More information about the geeks mailing list