🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #41970

Re: Pb with static link on AIX 3.2

#41970
From: Peter J Halvorsen
Date: Wed, 31 Jan 1996 00:00
49 lines
1701 bytes
Look at the makefile in the src directory for emacs.
I had the same problem with xemacs. There is a flag '-Wl'
with needs to point to the libgcc.a library. Set it thusly:

-Wlgcc

and it should compile.

-peter


In article <JTHOMAS.96Jan17154525@crisv2.univ-pau.fr>,
Jerome Thomas <jthomas@univ-pau.fr> wrote:
>
>  Hi,
>
>  I was trying to compile emacs-19.30 on AIX 3.2 with gcc 2.7.2, and
>I've got a link error. All the system calls are undefined. This is
>related to the fact that emacs links statically. For instance, if I
>try to compile statically the following program:
>
>% more foo.c
>#include <unistd.h>
>#include <stdio.h>
>
>main() {
>  printf("%d\n",getpgrp()) ;
>}
>
>with 
>% gcc -static foo.c
>collect2: ld returned 1 exit status
>/tmp/ccsHoCrx1.o(.pr+0x1c):foo.c: undefined reference to `getpgrp'
>/tmp/ccsHoCrx1.o: loader reloc in read-only section .text
>/u/powerpc-ibm-aix3.2.5/bin/ld: final link failed: Invalid operation
>
>  Any hint greatly apreciated,
>
>  Thanks in advance,
>
>Jerome Thomas
>
>P.S. If this does help:
>% uname -a
>AIX infibm1 2 3 002063684800
>% gcc -v
>Reading specs from /u/lib/gcc-lib/powerpc-ibm-aix3.2.5/2.7.2/specs
>gcc version 2.7.2
>
Technical Details
Message-ID: <4eobve$h8m@gullum.btv.ibm.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <JTHOMAS.96Jan17154525@crisv2.univ-pau.fr>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,e5e2397778f6442a
X-Google-Attributes: gid11318c,public
From: peterh@gullum.btv.ibm.com (Peter J Halvorsen)
Subject: Re: Pb with static link on AIX 3.2
Date: 1996/01/31
Message-ID: <4eobve$h8m@gullum.btv.ibm.com>
X-Deja-AN: 137366635
references: <JTHOMAS.96Jan17154525@crisv2.univ-pau.fr>
organization: IBM Microelectronics Division
reply-to: peterh@vnet.ibm.com
newsgroups: gnu.gcc.help