[llvm-commits] [llvm-gcc-4.2] r67516 - in /llvm-gcc-4.2/trunk/gcc/config: i386/linux.h i386/linux64.h rs6000/sysv4.h
Nick Lewycky
nicholas at mxc.ca
Mon Mar 23 09:50:32 PDT 2009
Duncan Sands wrote:
> Author: baldrick
> Date: Mon Mar 23 05:54:30 2009
> New Revision: 67516
>
> URL: http://llvm.org/viewvc/llvm-project?rev=67516&view=rev
> Log:
> Revert commit 67369: older versions of ld do not
> support the --hash-style option, for example
> GNU ld version 2.17 Debian GNU/Linux
> which is in use on a couple of nightly testers.
Hi Duncan. What does GCC do here? Detect it at configure time?
The difference is seen with:
int main() { return 0; }
compiled by the llvm-g++ driver vs. the FSF g++ driver. When built
without --hash-style "valgrind --tool=callgrind" reports 2,206,956
instructions vs. 1,334,028 with this patch. The extra instructions are
due to the dynamic linker doing extra work to load the program.
Nick
> Modified:
> llvm-gcc-4.2/trunk/gcc/config/i386/linux.h
> llvm-gcc-4.2/trunk/gcc/config/i386/linux64.h
> llvm-gcc-4.2/trunk/gcc/config/rs6000/sysv4.h
>
> Modified: llvm-gcc-4.2/trunk/gcc/config/i386/linux.h
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/linux.h?rev=67516&r1=67515&r2=67516&view=diff
>
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/config/i386/linux.h (original)
> +++ llvm-gcc-4.2/trunk/gcc/config/i386/linux.h Mon Mar 23 05:54:30 2009
> @@ -109,8 +109,7 @@
> { "dynamic_linker", LINUX_DYNAMIC_LINKER }
>
> #undef LINK_SPEC
> -/* LLVM LOCAL set linker hash_style */
> -#define LINK_SPEC "-m %(link_emulation) --hash-style=both %{shared:-shared} \
> +#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
> %{!shared: \
> %{!ibcs: \
> %{!static: \
>
> Modified: llvm-gcc-4.2/trunk/gcc/config/i386/linux64.h
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/linux64.h?rev=67516&r1=67515&r2=67516&view=diff
>
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/config/i386/linux64.h (original)
> +++ llvm-gcc-4.2/trunk/gcc/config/i386/linux64.h Mon Mar 23 05:54:30 2009
> @@ -53,8 +53,7 @@
> #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
>
> #undef LINK_SPEC
> -/* LLVM LOCAL set linker hash_style */
> -#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} --hash-style=both \
> +#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
> %{shared:-shared} \
> %{!shared: \
> %{!static: \
>
> Modified: llvm-gcc-4.2/trunk/gcc/config/rs6000/sysv4.h
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/rs6000/sysv4.h?rev=67516&r1=67515&r2=67516&view=diff
>
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/config/rs6000/sysv4.h (original)
> +++ llvm-gcc-4.2/trunk/gcc/config/rs6000/sysv4.h Mon Mar 23 05:54:30 2009
> @@ -910,9 +910,8 @@
> #define LINUX_DYNAMIC_LINKER \
> CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
>
> -/* LLVM LOCAL set linker hash_style */
> -#define LINK_OS_LINUX_SPEC "-m elf32ppclinux --hash-style=both %{!shared: \
> - %{!static: %{rdynamic:-export-dynamic} \
> +#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
> + %{rdynamic:-export-dynamic} \
> %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}"
>
> #if defined(HAVE_LD_EH_FRAME_HDR)
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list