This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: egcs 1.1.2: patch for libio/config/hpux.mt:
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Re: egcs 1.1.2: patch for libio/config/hpux.mt:
- From: markh at frazier dot landmark dot com
- Date: Wed, 31 Mar 1999 18:02:46 -0500
- Cc: markh at saturn dot landmark dot com
- References: <85256745.00769EA2.00@lnserver.landmark.com>
> >
> > EGCS Maintainers,
> >
> > The following patch is intended to solve a problem with compiling
> > the egcs 1.1.2 source file libstdc++/cmathi.cc on the platform
> > hppa1.1-hp-hpux10.01 (although the solution applies to HP generally,
> > I think).
> >
> > According to libio/ChangeLog, it is apparently appropriate (since
> > 1993) for MATH_H_INLINES no longer to be defined for HPUX, contrary
> > to my proposed patch.
> >
> > >
> > > Wed Dec 1 13:19:14 1993 Per Bothner (bothner@kalessin.cygnus.com)
> > >
> > > * config/hpux.mt (MATH_H_INLINES): No longer define.
> > > Patch from Jeffrey A Law <law@snake.cs.utah.edu>.
> > >
> >
> > But without MATH_H_INLINES defined, I get the following compilation
> > error:
> Sounds like fixincludes didn't do it's job since it should have taken care
> of the bogus definition of abs and other functions in math.h.
>
> I think your patch is papering over the problem -- find out why fixincludes
> didn't fix math.h.
>
>
> jeff
>
Yes, you were correct in saying the problem was somewhere other than
the fix I submitted above. There was a non-fatal error during the
building of the compiler:
> Fixing directory /usr/include into /h/markh/gnu/debug/egcs-1.1.2/gcc/include
> /.stage/pwb/gnu/gcc/egcs-1.1.2/gcc/fixinc.sh[318]: /h/markh/gnu/debug/egcs-1.1.2/gcc/fixincl: not found.
The script 'fixinc.sh' was attempting to run the script 'fixincl',
which it expected to find in the directory tree in which I was building
the compiler. However, the script 'fixincl' is in the EGCS source
directory tree, not in the directory in which compilation was taking
place. Here's what I did to fix the problem:
1) Modify the the gcc/Makefile so that when it calls fixinc.sh,
pass to this script a new, third parameter that identifies the
location of the 'fixincl' script.
2) Modify the 'fixinc.sh' script so that it uses the new, third
parameter to locate the 'fixincl' script.
diff -c egcs-1.1.2/gcc/Makefile.in egcs-1.1.2/gcc/Makefile.in~
*** egcs-1.1.2/gcc/Makefile.in Tue Mar 30 19:56:04 1999
--- egcs-1.1.2/gcc/Makefile.in~ Sun Mar 7 19:22:20 1999
***************
*** 1995,2001 ****
DEST=`cd $(srcdir) ; pwd`/$@ CC=$(CC) MAKE=$(MAKE) CFLAGS="$(CFLAGS)" \
export DEST CC MAKE CFLAGS ; \
echo DEST=$$DEST CC=$$CC MAKE=$$MAKE CFLAGS=$$CFLAGS ; \
! cd $(srcdir)/../contrib/fixinc ; \
$(SHELL) mkfixinc.sh $(target) $$DEST
# Build fixed copies of system files.
--- 1995,2001 ----
DEST=`cd $(srcdir) ; pwd`/$@ CC=$(CC) MAKE=$(MAKE) CFLAGS="$(CFLAGS)" \
export DEST CC MAKE CFLAGS ; \
echo DEST=$$DEST CC=$$CC MAKE=$$MAKE CFLAGS=$$CFLAGS ; \
! cd ../contrib/fixinc ; \
$(SHELL) mkfixinc.sh $(target) $$DEST
# Build fixed copies of system files.
***************
*** 2007,2013 ****
for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
if [ -d $$dir ]; \
then \
! $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir $(srcdir); \
else true; fi; \
done; \
if [ x$(INSTALL_ASSERT_H) != x ] ; \
--- 2007,2013 ----
for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
if [ -d $$dir ]; \
then \
! $(SHELL) $(srcdir)/$(FIXINCLUDES) include $$dir; \
else true; fi; \
done; \
if [ x$(INSTALL_ASSERT_H) != x ] ; \
========================================================================
diff -c egcs-1.1.2/contrib/fixinc/fixincl.sh egcs-1.1.2/contrib/fixinc/fixincl.sh~
*** egcs-1.1.2/contrib/fixinc/fixincl.sh Tue Mar 30 17:04:41 1999
--- egcs-1.1.2/contrib/fixinc/fixincl.sh~ Sun Mar 14 06:13:11 1999
***************
*** 96,102 ****
esac
# Original directory.
! ORIGDIR=${3}
FIXINCL=${ORIGDIR}/fixincl
export FIXINCL
--- 96,102 ----
esac
# Original directory.
! ORIGDIR=`${PWDCMD}`
FIXINCL=${ORIGDIR}/fixincl
export FIXINCL
As far as I can tell, the file 'egcs-1.1.2/contrib/fixinc/inclhack.tpl'
should be edited instead of 'fixinc.sh', but I don't have the program
'autogen' so I edited 'fixinc.sh' directly. Here's what I'm guessing
needs to be done to inclhack.tpl:
diff -c egcs-1.1.2/contrib/fixinc/inclhack.tpl egcs-1.1.2/contrib/fixinc/inclhack.tpl~
*** egcs-1.1.2/contrib/fixinc/inclhack.tpl Wed Mar 31 17:56:35 1999
--- egcs-1.1.2/contrib/fixinc/inclhack.tpl~ Fri Mar 20 11:19:41 1998
***************
*** 83,89 ****
esac
# Original directory.
! ORIGDIR=${3}[=
_IF PROGRAM _env =]
FIXINCL=${ORIGDIR}/fixincl
export FIXINCL[=
--- 83,89 ----
esac
# Original directory.
! ORIGDIR=`${PWDCMD}`[=
_IF PROGRAM _env =]
FIXINCL=${ORIGDIR}/fixincl
export FIXINCL[=
--
## Mark Harig
## Landmark Systems, Vienna, Virginia, USA
## Email: markh@landmark.com