Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* configure patch for hpux
@ 2001-12-12 21:46 law
  2001-12-12 22:43 ` Alexandre Oliva
  2001-12-15  8:41 ` Andrew Cagney
  0 siblings, 2 replies; 10+ messages in thread
From: law @ 2001-12-12 21:46 UTC (permalink / raw)
  To: gdb-patches


aclocal.m4 includes code to find what options (if any) will put the host
compiler into an ANSI-like mode.

However, we do not want to go into strict ANSI mode as that turns off
useful extensions and breaks some systems's header files (almost a direct
quote from aclocal.m4).

For HPUX, using -Aa gives you an ANSI compiler, but has non-ANSI extensions
turned off.  -Ae gives you ANSI with the extensions.

Amazingly enough, this actually matters as I've personally experienced on
an hpux10.20 system with the unbundled ANSI compiler installed.

This patch to aclocal.m4 uses -Ae instead of -Aa to get ANSI+extensions
on hpux systems.

I have checked that this patch does not cause any problems on both
hpux10.20 and hpux11.00 systems, with both the bundled and unbundled
compiler.  It does fix compile-time failures when building with the 
unbundled compiler on hpux10.20.

Some time ago I stepped down as PA maintainer for GDB; so I'm not going
to install the patch until I get authorization from the GDB maintainers.

	* aclocal.m4 (proc_cc_stdc): Use -Ae, not -Aa to get ANSI+extensions
	on hpux systems.
	* configure: Rebuilt.

Index: aclocal.m4
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/aclocal.m4,v
retrieving revision 2.31
diff -c -3 -p -r2.31 aclocal.m4
*** aclocal.m4	2001/08/29 04:06:55	2.31
--- aclocal.m4	2001/12/13 05:29:22
*************** ac_save_CC="$CC"
*** 966,974 ****
  # breaks some systems' header files.
  # AIX			-qlanglvl=ansi
  # Ultrix and OSF/1	-std1
! # HP-UX			-Aa -D_HPUX_SOURCE
  # SVR4			-Xc -D__EXTENSIONS__
! for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc 
-D__EXTENSIONS__"
  do
    CC="$ac_save_CC $ac_arg"
    AC_TRY_COMPILE(
--- 966,974 ----
  # breaks some systems' header files.
  # AIX			-qlanglvl=ansi
  # Ultrix and OSF/1	-std1
! # HP-UX			-Ae -D_HPUX_SOURCE
  # SVR4			-Xc -D__EXTENSIONS__
! for ac_arg in "" -qlanglvl=ansi -std1 "-Ae -D_HPUX_SOURCE" "-Xc 
-D__EXTENSIONS__"
  do
    CC="$ac_save_CC $ac_arg"
    AC_TRY_COMPILE(





^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: configure patch for hpux
@ 2001-12-19  8:48 law
  0 siblings, 0 replies; 10+ messages in thread
From: law @ 2001-12-19  8:48 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Alexandre Oliva, gdb-patches


  > Technically I maintain it.  In practice Akim Demaille does.
  >
  > The current automake/m4/ccstdc.m4 says this:
  >
  >    # HP-UX 10.20 and later	-Ae
  >    # HP-UX older versions	-Aa -D_HPUX_SOURCE
Yea, that wouldn't surprise me.   I seem to recall that -Ae is a relatively
new switch (circa 1996/1997).

So, maybe the right thing to do (if we still care about anything pre-hpux10.20)
is to try -Ae first, then fall back to -Aa -D_HPUX_SOURCE.


  > It would be good to upgrade our tree to automake 1.5.
  > However, 1.5 might not yet be stable enough for this :-(.
I'm not really qualified to make that call.

Tom



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2001-12-19 16:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-12 21:46 configure patch for hpux law
2001-12-12 22:43 ` Alexandre Oliva
2001-12-12 22:52   ` law
2001-12-12 23:08     ` Alexandre Oliva
2001-12-15  8:47       ` Andrew Cagney
2001-12-15 21:17         ` Alexandre Oliva
2001-12-18  9:29       ` law
2001-12-18 12:59         ` Tom Tromey
2001-12-15  8:41 ` Andrew Cagney
2001-12-19  8:48 law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox