Article View: gnu.gcc.help
Article #46633Re: Need help compiling glibc-1.08.1 on SunOS 4.1.2
From: Neil Jerram
Date: Fri, 28 Oct 1994 17:40
Date: Fri, 28 Oct 1994 17:40
42 lines
2739 bytes
2739 bytes
In article <3898bu$l63@mcrware.microware.com> johnl@microware.com (John Lengeling) writes: I need some help compiling glibc-1.08.1 under SunOS 4.1.2 using gcc 2.6.0. I get an error compileing version.c: [bear]/home/bear/johnl/glibc-1.08.1/sun4% make make -C .. objdir=`pwd` all make[1]: Entering directory `/home/bear/johnl/glibc-1.08.1' gcc version.c -c -Wall -Wno-parentheses -Wwrite-strings -g -I. -I/home/bear/johnl/glibc-1.08.1/sun4 -Isysdeps/unix/bsd/sun/sunos4 -Isysdeps/unix/mman -Isysdeps/unix/bsd/sun/sparc -Isysdeps/unix/bsd/sun -Isysdeps/unix/bsd -Isysdeps/unix/common -Isysdeps/unix/inet -Isysdeps/unix/sparc -Isysdeps/unix -Isysdeps/posix -Isysdeps/sparc -Isysdeps/ieee754 -Isysdeps/generic -Isysdeps/stub -DHAVE_SYS_SIGLIST=1 -DHAVE_PSIGNAL=1 -D_LIBC -o /home/bear/johnl/glibc-1.08.1/sun4/version.o In file included from ./stdio.h:1, from version.c:20: ./stdio/stdio.h:167: parse error before `__attribute__' make[1]: *** [/home/bear/johnl/glibc-1.08.1/sun4/version.o] Error 1 make[1]: Leaving directory `/home/bear/johnl/glibc-1.08.1' make: *** [all] Error 2 The problem is that gcc's syntax for specifying `const' and `volatile' attributes for function has changed. Before version 2.6.0 (I think!), it used the keywords `const' and `volatile' BEFORE the function name. Now it wants `__attribute__ ((const))' and `__attribute__ ((noreturn))' (or something like that) AFTER the function name. Thus the header files that #define _CONST and _NORETURN are wrong for gcc >2.6.0. I fixed the problem by going through the affected files and changing these symbols' positions by hand. (Someone clever could probably write a script.) If you're not worried about optimisation, you might fix it quickly'n'dirtily by finding the #definitions of _CONST and _NORETURN and following them by #define _CONST and #define _NORETURN respectively, assuming that spaces before a function name have the same effect as spaces after it, i.e. none. Neil.
Technical Details
Message-ID:
<NJ104.94Oct28174049@hilsa.amtp.cam.ac.uk>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!pipex!lyra.csx.cam.ac.uk!nj104References:
<3898bu$l63@mcrware.microware.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,a773b90f2e40f23c X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1994-10-28 10:58:15 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!pipex!lyra.csx.cam.ac.uk!nj104 From: nj104@amtp.cam.ac.uk (Neil Jerram) Newsgroups: gnu.gcc.help Subject: Re: Need help compiling glibc-1.08.1 on SunOS 4.1.2 Date: 28 Oct 1994 17:40:49 GMT Organization: DAMTP, Cambridge University, UK Lines: 42 Message-ID: <NJ104.94Oct28174049@hilsa.amtp.cam.ac.uk> References: <3898bu$l63@mcrware.microware.com> NNTP-Posting-Host: hilsa.amtp.cam.ac.uk In-reply-to: johnl@microware.com's message of 21 Oct 1994 20:29:50 GMT CC: johnl@microware.com