|
From: | Bob Friesenhahn |
Subject: | Re: Additional link flags for HP aCC and SGI CC |
Date: | Fri, 3 Sep 2004 12:58:58 -0500 (CDT) |
On Fri, 3 Sep 2004, Gary V. Vaughan wrote:
Hi Albert, Albert Chin wrote:On Thu, Sep 02, 2004 at 06:04:44PM +0200, Ludovic Court?s wrote: The following patch will pass all -[arg] and +[arg] switches through. Is it safe?On a mostly philosophical point, I think that allowing arguments that libtool doesn't recognize through to the compiler removes some of the advantages that libtool brings to a project: it is the thin end of the wedge to starting to put non-portable flags into Makefile.am.
What is wrong with using non-portable flags? Why would non-portable necessarily appear in Makefile.am rather than configure.ac? The world revolves around non-portable flags but it rejects non-portable behavior.
Besides, you can already do this, but at the moment you have to do it consciously and say `-Xcompiler -peculiar-flag-for-my-compiler', which at least forces the user to acknowledge that they are going behind libtool's back, so it will be hardly surprising to them if libtool gets confused later on...
I suspect that you are unnecessarily limiting your development to the Linux/GCC platform. You may find it somewhat entertaining and enlightening to accomplish non-default compilation (e.g. 64-bit) using something other than GCC. What you will learn is that -Xcompiler and -Xlinker often confuses the build (e.g. building/linking partially 32-bit/64-bit code) and that it takes a very careful incantation with a very careful replication of -Xcompiler and -Xlinker options in the right places in order to achieve success. What I (and Albert) have seen is that things can behave very poorly because the compiler sometimes should alter its behavior based on linker options, but the compiler does not pay attention to options it is instructed to blindly pass through to the linker.
For GCC I inserted support for passing the -m options. This tends to make builds using GCC happy, but does nothing for other compilers.
Bob ====================================== Bob Friesenhahn address@hidden http://www.simplesystems.org/users/bfriesen
[Prev in Thread] | Current Thread | [Next in Thread] |