Bug 10663 - [Solaris] New configure check aborts with Sun tools.
Summary: [Solaris] New configure check aborts with Sun tools.
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.0
: P3 normal
Target Milestone: 3.4.0
Assignee: Eric Botcazou
URL:
Keywords:
: 11004 11088 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-07 12:26 UTC by Eric Botcazou
Modified: 2003-06-12 00:03 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-05-24 19:56:38


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Botcazou 2003-05-07 12:26:00 UTC
The new configure check added by

2002-11-26  Jakub Jelinek  <jakub@redhat.com>

	* varasm.c (default_exception_section): Move to...
	* except.c (default_exception_section): ... here. Make
	.gcc_except_table read-only if it is not expected to have any
	dynamic relocations and linker handles it.
	* dwarf2out.c (default_eh_frame_section): Make .eh_frame read-only
	if it is not expected to have any dynamic relocations and linker
	handles it.
	* configure.in (HAVE_LD_RO_RW_SECTION_MIXING): Check what ld does
	when linking read-only and read-write sections together.
	* configure, config.in: Rebuilt.
	* crtstuff.c (EH_FRAME_SECTION_CONST): Define.
	(__EH_FRAME_BEGIN__, __FRAME_END__): Add it.

is not portable.


On Solaris 2.5.1, 2.6, 2.7:
checking linker read-only and read-write section mixing... ld: fatal: option -h and building a dynamic executable are incompatible
ld: fatal: Flags processing errors

'-shared' is not supported by Sun ld.


On Solaris 2.8, 2.9:
checking linker read-only and read-write section mixing... /usr/ccs/bin/as: "conftest1.s", line 1: error: statement syntax

'.section "myfoosect", "a"' is not supported by Sun as.

Release:
GCC 3.3pre and GCC 3.4exp

Environment:
Sparc/Solaris 2.5.1, 2.6, 2.7, 2.8, 2.9 with Sun tools.

How-To-Repeat:
Configure the compiler on the aforementioned Solaris versions with Sun tools.
Comment 1 Eric Botcazou 2003-05-07 12:26:00 UTC
Fix:
Disable the check on non-Dwarf2 platforms?
Comment 2 Eric Botcazou 2003-05-07 12:44:55 UTC
Responsible-Changed-From-To: unassigned->jakub
Responsible-Changed-Why: Author of the patch.
    
    Jakub, what do you think about the proposed fix? Is it too gross?
Comment 3 Eric Botcazou 2003-05-07 12:44:55 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed on the 3.3 branch.
Comment 4 Eric Botcazou 2003-05-08 10:18:46 UTC
From: Eric Botcazou <ebotcazou@libertysurf.fr>
To: gcc-gnats@gcc.gnu.org
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: target/10663: [Solaris] New configure check aborts with Sun tools.
Date: Thu, 8 May 2003 10:18:46 +0200

 > On Solaris 2.5.1, 2.6, 2.7:
 > checking linker read-only and read-write section mixing... ld: fatal:
 > option -h and building a dynamic executable are incompatible ld: fatal:
 > Flags processing errors
 >
 > '-shared' is not supported by Sun ld.
 
 Well, it's not much better on Solaris 7 with GNU Binutils 2.13.2.1:
 
 checking linker read-only and read-write section mixing... grep: illegal 
 option -- A
 grep: illegal option -- 1
 Usage: grep -hblcnsviw pattern file . . .
 
 -- 
 Eric Botcazou

Comment 5 kcook34 2003-05-16 16:15:44 UTC
From: Kelley Cook <kcook34@ford.com>
To: Joe Buck <jbuck@synopsys.com>
Cc: gcc@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Subject: target/10663 (was Re: non-portable construct in gcc configure script)
Date: Fri, 16 May 2003 16:15:44 -0400

 Joe Buck wrote:
 > In the test labeled
 > 
 > AC_MSG_CHECKING(linker read-only and read-write section mixing)
 > 
 > gcc/configure.in in 3.3 uses "grep -A1".  This feature is not in Solaris's
 > grep.  It's not in the HP-UX grep either.
 > 
 > The result is that the configure output looks like
 > 
 > checking linker read-only and read-write section mixing... grep: illegal option -- A
 > grep: illegal option -- 1
 > Usage: grep -hblcnsviw pattern file . . .
 > 
 > on Solaris 2.8.  The failure appears harmless, but I'm not sure.
 
 There is another non-portable feature in that exact same test.
 
 I sent a patch for it a few weeks ago, if someone would like to review that
 at the same time.
 
 http://gcc.gnu.org/ml/gcc-patches/2003-04/msg02262.html
 
 --- forward ----
 Cygwin is not completing the "linker read-only and
 read-write section mixing" configure test. It aborts with:
 
 conftest1.s: Assembler messages:
 conftest1.s:1: Warning: rest of line ignored; first ignored
 character is `"'
 
 It seems that Cygwin's "as" doesn't like double-quotes
 surrounding it's section names.  This in itself may or may
 not be a bug, but it that is not what this particular
 conftest is testing.  Regardless, from what I can gather
 from the gas docs not having the quotes should be OK on all
 targets.
 ---- end ----
 
 Kelley Cook
Comment 6 Eric Botcazou 2003-05-24 19:55:52 UTC
I'll try to fix it incrementally.
Comment 7 Eric Botcazou 2003-05-28 07:35:46 UTC
*** Bug 11004 has been marked as a duplicate of this bug. ***
Comment 8 Eric Botcazou 2003-06-05 07:31:53 UTC
*** Bug 11088 has been marked as a duplicate of this bug. ***
Comment 9 Eric Botcazou 2003-06-05 08:17:40 UTC
See http://gcc.gnu.org/ml/gcc-patches/2003-06/msg00422.html

Kelley, I'm closing this PR since it is registered as a Solaris specific
problem. But I asked Zack to take a look at your patch.
Comment 10 mmokrejs 2003-06-05 12:22:59 UTC
So is this bug really fixed or just closed? Is there a patch available?
Comment 11 Eric Botcazou 2003-06-05 12:33:59 UTC
Subject: Re:  [Solaris] New configure check aborts with Sun tools.

> So is this bug really fixed or just closed? Is there a patch available?

Ahem... did you read the comment? It contains a link to the patch.

Comment 12 mmokrejs 2003-06-05 12:56:45 UTC
Well, I'm rerunning bootstrap again now. Thanks. :))