Alex Ferguson wrote:
[...]
I'm using OSF 3.2, however, so your kilometerage may vary considerably...
[...]
ghc-0.29 -o hsc [ridiculously long argument list removed]
/bin/ld:
Warning: Linking some objects which contain exception information sections
and some which do not. This may cause fatal runtime exception handling
problems (last obj encountered without exceptions was main/LoopHack.o).
I don't speak DECish too fluently, but here's my humble guess:
Under arcane circumstances, linking gcc-compiled code on DEC-Unix 3.2
produces the above warning. It's annoying, but it doesn't hurt (at least
apart from aesthetics :-) . Anyway, I digged up an old gcc patch from
long forgotten sources and appended it to this mail.
BTW, stripping executables with the GNU-strip makes some trouble
on our DECs. Wise comments from a DEC-grandmaster would be greatly
appreciated...
Much fun recompiling gcc! :-]
(My first mailing attempt failed because vanuata.dcs.gla.ac.uk and my
Netscape apparently didn't like each other, having a dispute about
their MIME-dialects. So here's good ol' ASCII... :-(
-- SNIP -- SNIP -- gcc-2.7.2/config/alpha/osf32.h -- SNIP -- SNIP
/* Definitions of target machine for GNU compiler, for DEC Alpha.
Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
Contributed by Richard Kenner ([EMAIL PROTECTED])
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "alpha/osf2.h"
/* In OSF 3.2, the loader issues warnings about possible exception handling
problems in object files which do not define a .text section and
which define the symbols `gcc2_compiled.' and `__gnu_compiled_c'
without any section specification. The following is a work around
and I do not know if it really works right! But at least it
suppresses the nasty loader warnings. */
#if defined (EXTRA_SECTIONS)
#undef EXTRA_SECTIONS
#endif
#define EXTRA_SECTIONS readonly_data, local_readonly_const_data
#if defined (EXTRA_SECTION_FUNCTIONS)
#undef EXTRA_SECTION_FUNCTIONS
#endif
#define EXTRA_SECTION_FUNCTIONS \
void\
literal_section () \
{ \
if (in_section != readonly_data) \
{ \
static int firsttime = 1; \
\
fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \
if (firsttime)\
{ \
firsttime = 0;\
ASM_OUTPUT_DOUBLE_INT (asm_out_file, const0_rtx); \
} \
\
in_section = readonly_data; \
} \
} \
void\
rconst_section () \
{ \
if (in_section != local_readonly_const_data) \
{ \
fprintf (asm_out_file, ".rconst\n"); \
in_section = local_readonly_const_data; \
} \
} \
#if defined (ASM_IDENTIFY_GCC)
#undef ASM_IDENTIFY_GCC
#endif
#define ASM_IDENTIFY_GCC(FILE) \
do { rconst_section (); \
fprintf(FILE, "gcc2_compiled.:\n");} while(0)
#if defined (ASM_IDENTIFY_GCC)
#undef ASM_IDENTIFY_LANGUAGE
#endif
#define ASM_IDENTIFY_LANGUAGE(FILE) \
do { rconst_section (); \
fprintf (FILE, "__gnu_compiled_%s:\n", lang_identify ());} while(0)
-- SNIP -- SNIP --