public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/45508]  New: Does adding configure-options for specs-hardcoding make sense?
@ 2010-09-02 19:48 nicolai dot stange at zmaw dot de
  2010-09-02 19:49 ` [Bug middle-end/45508] " nicolai dot stange at zmaw dot de
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: nicolai dot stange at zmaw dot de @ 2010-09-02 19:48 UTC (permalink / raw)
  To: gcc-bugs

Hi everybody,

I'm not involved in any gcc development nor am I familiar with gcc and its
components and thus, the attached patch is just a place to start from if you
agree with me that my request for adding more control over the specs via
configure options makes sense.

My problem is this one:
At our site, we provide many versions of several compilers, including the great
GCC, at non-standard locations. The problem is with the runtime search paths
for the libgcc_s, ...: The runtime linker always finds the most wrong one: The
one from Blastwave in /opt/csw/lib (this is Solaris-specific, but if it were
Linux or sth. other, it would also find the wrong libgcc_s, shipped with the
distribution, or none at all). 

Asking the kind guys in #gcc at freenode, they told me that I might want to
supply a specs file. Hmm, I want to set site-wide specs for all users
transparently. Reading the sourcecode of gcc, I recognized that I can put a
complete specs file to <gcc_prefix>/lib/gcc/<target>/<version>/specs.
(I didn't find any documentation about that feature, so maybe this lack of docs
is another bug?).

But this solution has two drawbacks for me:
- I'm bootstrapping and the linking of the runtime libraries for the target
would not be influenced by placing this specs-file _after_ installation. Ok, I
could go with LDFLAGS_FOR_TARGET, but this would make the whole thing more
non-convenient (at least in my opionion).
- Creating that specs-file for every GCC-release makes automating the GCC
deployment harder: At first I have to check if the default-specs are still the
same, the I have to modify them to insert a runtime search path for the new
installation location and then I have to put it at the right location. It seems
that I have to exercise some bash/sed/diff/m4-tasks...

Another solution would be this:
Adding a --with-link-libgcc-specs option to the configure in the
gcc-subdirectory, I could configure gcc with
../gcc-4.5.1/configure
--with-link-libgcc-specs="\${!m64:-R/opt/gcc-4.5.1/lib}\${m64:-R/opt/gcc-4.5.1/lib/sparcv9}"
...
(btw: "-R" is the "-rpath"-equivalent of the Sun Linker on Solaris)

If this user-supplied spec would be prepended/appended to the default
link_libgcc spec, all would be fine.

The attached patch is for link_libgcc spec only, but maybe altering the other
specs by configure-options might be useful for other people under other
circumstances, too?

Please note again, that the attached patch is just a quick hack, if you agree
to add those options, one should have a closer look.

Best wishes

Nicolai


-- 
           Summary: Does adding configure-options for specs-hardcoding make
                    sense?
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nicolai dot stange at zmaw dot de
 GCC build triplet: sparc-sun-solaris2.10
  GCC host triplet: sparc-sun-solaris2.10
GCC target triplet: sparc-sun-solaris2.10


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45508


^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <bug-45508-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2010-10-04 19:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-02 19:48 [Bug middle-end/45508] New: Does adding configure-options for specs-hardcoding make sense? nicolai dot stange at zmaw dot de
2010-09-02 19:49 ` [Bug middle-end/45508] " nicolai dot stange at zmaw dot de
2010-09-02 19:55 ` [Bug middle-end/45508] New: " Andrew Pinski
2010-09-02 19:55 ` [Bug middle-end/45508] " pinskia at gmail dot com
2010-09-02 20:15 ` nicolai dot stange at zmaw dot de
2010-09-02 22:29 ` pinskia at gcc dot gnu dot org
2010-09-04 19:31 ` nicolai dot stange at zmaw dot de
     [not found] <bug-45508-4@http.gcc.gnu.org/bugzilla/>
2010-10-04 19:05 ` nicolai.stange at zmaw dot de

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).