This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Resend of Patches for HP-UX support on IA64
- To: Steve Ellcey <sje at cup dot hp dot com>
- Subject: Re: Resend of Patches for HP-UX support on IA64
- From: "Zack Weinberg" <zackw at stanford dot edu>
- Date: Tue, 13 Mar 2001 10:33:58 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <200103131737.JAA14394@hpsje.cup.hp.com>
On Tue, Mar 13, 2001 at 09:37:43AM -0800, Steve Ellcey wrote:
>
> I sent some patches last week (March 5) for HP-UX support on IA64 and
> asked that they be checked in but I have not heard any feedback so I
> am sending them again in the hopes that someone will look them over
> and check them in. I did tweek my config.gcc change a little to clean
> it up from the last submission.
I have some nits to pick.
> *** config/ia64/hpux.h.orig Mon Mar 5 12:57:17 2001
> --- config/ia64/hpux.h Mon Mar 5 10:48:23 2001
> ***************
> *** 0 ****
> --- 1,76 ----
> + /* Definitions for ia64-hpux target. */
Missing copyright notice.
> + #include "ia64/ia64.h"
> + #include "svr4.h"
> + #include "sysv4.h"
Please use the new style, listing each relevant header explicitly in
config.gcc.
I think you mean ia64/sysv4.h. config/ia64 is not in the -I list.
> + #undef CPP_PREDEFINES
> + #define CPP_PREDEFINES "\
> + -D__IA64__ -D__ia64 -D__ia64__ -D__hpux -D__hpux__ -Dhpux -Dunix \
> + -D__BIG_ENDIAN__ -D_LONGLONG -D__ELF__ \
> + -Asystem(hpux) -Acpu(ia64) -Amachine(ia64) -D_UINT128_T"
Please use the new syntax for -A: -Asystem=hpux. This allows cutting
and pasting -v output back into the shell without digging through to
find the parentheses and quote them.
Shouldn't you have an -Asystem=posix in there?
> + /* -D__fpreg=long double is needed to compensate for the lack of __fpreg
> + which is a primitive type in HP C but does not exist in GNU C. Same
> + for __float80 and __float128. These types appear in HP-UX header
> + files and so must have some definition. */
> +
> + #undef CPP_SPEC
> + #define CPP_SPEC "\
> + %{mcpu=itanium:-D__itanium__} %{mbig-endian:-D__BIG_ENDIAN__} \
> + %{!milp32:-D__LP64__ -D__LONG_MAX__=9223372036854775807L} \
> + %{!ansi: -D_HPUX_SOURCE -D__STDC_EXT__} \
> + -D__fpreg=long\\ double \
> + -D__float80=long\\ double \
> + -D__float128=long\\ double"
The -mcpu, -mbig-endian, -milp32 stuff should be factored out into a
CPP_CPU_SPEC shared by all the IA64 targets. And -milp32 should not
appear until it actually works, i.e. changes the size of long and
pointers in the compiler.
> + #undef CONST_SECTION_ASM_OP
> + #define CONST_SECTION_ASM_OP "\t.section\t.data,\t\"a\",\t\"progbits\""
.rodata, surely?
> + /* We need this macro to output DWARF2 information correctly. The macro
> + is defined in dwarf2out.c, but it will not do section relative offsets
> + which messes up our ability to debug using gdb. */
> +
> + #undef ASM_OUTPUT_DWARF_OFFSET
> + #define ASM_OUTPUT_DWARF_OFFSET(FILE,LABEL) \
> + do { \
> + fprintf ((FILE), "\t%s\t", UNALIGNED_OFFSET_ASM_OP); \
> + fprintf ((FILE), "@secrel("); \
> + assemble_name (FILE, LABEL); \
> + fprintf ((FILE), ")"); \
> + } while (0)
Shouldn't this be made common to all IA64 targets, if the problem is
as universal as it sounds?
> + /* End of hpux.h */
Leave this out.
zw