This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[971207]: Patch for missing POSIX symbols [Was: Re: Egcs-971207 builds on rs6000-ibm-aix3.2.5 with handholding ]
On Fri, 12 December 1997, 09:04:33, Manfred.Hollstein@ks.sel.alcatel.de wrote:
> On Thu, 11 December 1997, 16:55:21, law@cygnus.com wrote:
>
> > In message <MDAEMON-F199712111144.AA440176MD1923@intera.com>you write:
> > > To build and install egcs-971207 on an rs6000 running aix3.2.5,
> > > I had to do the following after configuring:
> > >
> > > 1) edit gcc/Makefile, adding -DNO_FILE to ENQUIRE_CFLAGS.
> > This is strange. As far as I know it should not be necessary. Exactly
> > why did you do this?
> >
>
> My guess, this is a result of a change to fix-header.c:
>
> /* We no longer massage include files for POSIX or XOPEN symbols,
> as there are now several versions of the POSIX and XOPEN standards,
> and it would be a maintenance nightmare for us to track them all.
> Better to be compatible with the system include files. */
> /*#define ADD_MISSING_POSIX 1 */
> /*#define ADD_MISSING_XOPEN 1 */
>
> Both were defined up to egcs-1.0. I got similar problems on m68k-motorola-sysv
> and m88k-motorola-sysv3 and will follow-up with a patch for these two systems
> soon.
>
> Manfred
With plain egcs-971207 sources I didn't succeed building the whole stuff;
due to missing prototypes (e.g. `read ()', `lseek ()', and `unlink ()') and
missing macros (e.g. `S_ISLNK') that were present in the fixed include files
in all previous snapshots, I got several unresolved symbols during `make check'.
This patch fixes it for me.
Thu Dec 11 18:31:10 1997 Manfred Hollstein <manfred@s-direktnet.de>
* m68k/xm-mot3300.h (ADD_MISSING_POSIX, ADD_MISSING_XOPEN): Define to
prevent unresolved externals in libio.
* m88k/xm-sysv3.h (ADD_MISSING_POSIX, ADD_MISSING_XOPEN): Likewise.
diff -c -p egcs-971207/gcc/config/m68k/xm-mot3300.h.orig egcs-971207/gcc/config/m68k/xm-mot3300.h
*** egcs-971207/gcc/config/m68k/xm-mot3300.h.orig Thu Dec 11 18:12:40 1997
--- egcs-971207/gcc/config/m68k/xm-mot3300.h Thu Dec 11 18:12:40 1997
*************** extern char *alloca ();
*** 40,42 ****
--- 40,46 ----
#define __PTR_TO_INT(P) ((int)(P))
#define __INT_TO_PTR(P) ((char *)(P))
+
+ /* We need POSIX/XOPEN symbols; otherwise make check will fail. */
+ #define ADD_MISSING_POSIX 1
+ #define ADD_MISSING_XOPEN 1
diff -c -p egcs-971207/gcc/config/m88k/xm-sysv3.h.orig egcs-971207/gcc/config/m88k/xm-sysv3.h
*** egcs-971207/gcc/config/m88k/xm-sysv3.h.orig Thu Dec 11 18:12:26 1997
--- egcs-971207/gcc/config/m88k/xm-sysv3.h Thu Dec 11 18:12:26 1997
*************** Boston, MA 02111-1307, USA. */
*** 28,30 ****
--- 28,34 ----
/* for the emacs version of alloca */
#define STACK_DIRECTION -1
+
+ /* We need POSIX/XOPEN symbols; otherwise make check will fail. */
+ #define ADD_MISSING_POSIX 1
+ #define ADD_MISSING_XOPEN 1