From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20195 invoked by alias); 1 Sep 2004 23:49:30 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20188 invoked by alias); 1 Sep 2004 23:49:29 -0000 Date: Wed, 01 Sep 2004 23:49:00 -0000 Message-ID: <20040901234929.20186.qmail@sourceware.org> From: "wilson at specifixinc dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040828001516.17219.gonnetp@inf.ethz.ch> References: <20040828001516.17219.gonnetp@inf.ethz.ch> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/17219] -static and -statig-libgcc aren't doing what they should. X-Bugzilla-Reason: CC X-SW-Source: 2004-09/txt/msg00110.txt.bz2 List-Id: ------- Additional Comments From wilson at specifixinc dot com 2004-09-01 23:49 ------- Subject: Re: -static and -statig-libgcc aren't doing what they should. pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-01 04:59 ------- > If this is true then how can we support -static, this is just like on *-*-darwin where -static is not > supported at all, well it is but only for a few things and mainly inside Apple only and Kext support but > then again KEXT support is not in the FSF compiler at all. I am not sure which part you are asking about. We can't make -Xlinker -static work. No one should expect that to work, as -Xlinker means pass an option directly to the linker without looking at it. This can only work for options that require no specs processing. Similarly, -Wl,-static. For irix6, we can presumably make -static work by modifying various specs rules to emit appropriate irix compiler/assembler/linker options. If you are asking me specifically whether this is possible, then I can't answer that, as I don't have access to an irix6 box. If you are asking me theoretically whether this is possible, then I am answering yes. However, I think most of the debate is moot, as it isn't advisable to do static linking on irix6 anyways. I don't remember all the details why, but I think part of the problem is that they have multiple versions of libc/libm, and if you static link, you may end up with code that won't run on all machines. They maybe are also doing the glibc trick of using dlopen to load alternative libraries at runtime, which does not work if you link statically. As for the pic vs non-pic issue, I think if you want non-pic static code from gcc for irix6, then you may have to do an actual port, as I don't believe there is any code in there to support this. You can still link pic code statically, you just won't get all of the benefits of using static code and static libraries. If this is all too complicated, then just say "-static isn't supported for Irix6" and close the bug report. I think this is a reasonable enough answer. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17219