From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6534 invoked by alias); 27 Nov 2007 12:24:40 -0000 Received: (qmail 6514 invoked by uid 22791); 27 Nov 2007 12:24:39 -0000 X-Spam-Check-By: sourceware.org Received: from mailout07.sul.t-online.de (HELO mailout07.sul.t-online.com) (194.25.134.83) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 27 Nov 2007 12:24:33 +0000 Received: from fwd30.aul.t-online.de by mailout07.sul.t-online.com with smtp id 1IwzUM-0000mZ-01; Tue, 27 Nov 2007 13:24:30 +0100 Received: from [84.152.245.64] (G0vbYoZ-ZhuAOk9L2IwzDb9pP8tFvdItH2S+Os-bOUla4VJnqmpJEST5lVhVf1BwAU@[84.152.245.64]) by fwd30.aul.t-online.de with esmtp id 1IwzTv-1q8Oa80; Tue, 27 Nov 2007 13:24:03 +0100 Message-ID: <474C0C52.8050503@t-online.de> Date: Tue, 27 Nov 2007 15:35:00 -0000 From: Bernd Schmidt User-Agent: Thunderbird 2.0.0.9 (X11/20071116) MIME-Version: 1.0 To: Jie Zhang CC: gcc@gcc.gnu.org, GCC Patches Subject: Re: Link tests after GCC_NO_EXECUTABLES References: <46EFBCC1.6070200@gmail.com> <46EFC383.7020503@t-online.de> <46EFC9E9.7090201@gmail.com> <46EFCEF9.3060304@t-online.de> <46EFCF7A.2080704@gmail.com> <46EFD236.6080907@t-online.de> <46EFDA4D.3070006@gmail.com> In-Reply-To: <46EFDA4D.3070006@gmail.com> Content-Type: multipart/mixed; boundary="------------070704070203030100000107" X-ID: G0vbYoZ-ZhuAOk9L2IwzDb9pP8tFvdItH2S+Os-bOUla4VJnqmpJEST5lVhVf1BwAU X-TOI-MSGID: a98dab9b-030c-424f-90b3-1d2afcdf5805 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg01468.txt.bz2 This is a multi-part message in MIME format. --------------070704070203030100000107 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 1524 Jie Zhang wrote: > Bernd Schmidt wrote: >> Jie Zhang wrote: >>> Bernd Schmidt wrote: >>>> Jie Zhang wrote: >>>>> But by design if gcc_no_link = no, link tests should be avoided. >>>> >>>> ??? I would have thought gcc_no_link = yes means link tests are >>>> avoided. >>>> >>> Oops, I meant gcc_no_link = yes. >> >> Stupid double negatives. Okay, so then your problem is that >> gcc_no_link=yes. Find out why it's setting that. >> > bfin-elf-gcc -mfdpic failed to link a simple test case because code is > put into L1 instruction sram and data is put into L1 data sram, but > Blackfin immediate offset load instruction cannot access GOT since the > gap between instruction sram and data sram is too large. Using -msim as > default will pass this test case and build gcc without problem but I > would like bfin-elf-gcc target hardware board by default. Use -fPIC as > default is not good, since -fpic is enough for any real applications. So > I would like to avoid link test for shl_load when GCC_NO_EXECUTABLES. I've committed the following to take care of this. Neither -mfdpic nor -mid-shared-library are actually useful with bfin-elf toolchains, but by making them imply -msim, we can at least get these kinds of configure test executables to link. Bernd -- This footer brought to you by insane German lawmakers. Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368 Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif --------------070704070203030100000107 Content-Type: text/x-patch; name="fix-bfin-elf.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fix-bfin-elf.diff" Content-length: 2198 Index: ChangeLog =================================================================== --- ChangeLog (revision 130463) +++ ChangeLog (working copy) @@ -1,3 +1,8 @@ +2007-11-27 Bernd Schmidt + + * config/bfin/elf.h (SUBTARGET_DRIVER_SELF_SPECS): New macro. + * doc/invoke.texi (Blackfin Options): Document the effects. + 2007-11-27 Ben Elliston * config/rs6000/sysv4.opt (m32): Add Negative(m64). Index: config/bfin/elf.h =================================================================== --- config/bfin/elf.h (revision 130463) +++ config/bfin/elf.h (working copy) @@ -30,4 +30,8 @@ asm ("P3 = [SP + 20];\n\tcall " USER_LAB asm (TEXT_SECTION_ASM_OP); #endif +#undef SUBTARGET_DRIVER_SELF_SPECS +#define SUBTARGET_DRIVER_SELF_SPECS \ + "%{mfdpic:-msim} %{mid-shared-library:-msim}" + #define NO_IMPLICIT_EXTERN_C Index: doc/invoke.texi =================================================================== --- doc/invoke.texi (revision 130463) +++ doc/invoke.texi (working copy) @@ -8668,6 +8668,8 @@ provided by libgloss to be linked in if Specifies that the program will be run on the simulator. This causes the simulator BSP provided by libgloss to be linked in. This option has effect only for @samp{bfin-elf} toolchain. +Certain other options, such as @option{-mid-shared-library} and +@option{-mfdpic}, imply @option{-msim}. @item -momit-leaf-frame-pointer @opindex momit-leaf-frame-pointer @@ -8717,6 +8719,7 @@ uClinux kernel. Generate code that supports shared libraries via the library ID method. This allows for execute in place and shared libraries in an environment without virtual memory management. This option implies @option{-fPIC}. +With a @samp{bfin-elf} target, this option implies @option{-msim}. @item -mno-id-shared-library @opindex mno-id-shared-library @@ -9642,6 +9645,7 @@ implies @option{-fPIE}. With @option{-f assumes GOT entries and small data are within a 12-bit range from the GOT base address; with @option{-fPIC} or @option{-fPIE}, GOT offsets are computed with 32 bits. +With a @samp{bfin-elf} target, this option implies @option{-msim}. @item -minline-plt @opindex minline-plt --------------070704070203030100000107--