[llvm-commits] [llvm-gcc-4.2] r73146 - /llvm-gcc-4.2/trunk/gcc/gcc.c

Nick Lewycky nicholas at mxc.ca
Tue Jun 9 21:54:15 PDT 2009


Rafael Espindola wrote:
> Author: rafael
> Date: Tue Jun  9 16:22:03 2009
> New Revision: 73146
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=73146&view=rev
> Log:
> Pass as instead of gcc to the gold plugin.

I think this broke something:

$ llvm-gcc -use-gold-plugin -flto -O2 hello.c -o hello
Segmentation fault
$ llvm-gcc -use-gold-plugin -flto -O2 hello.c -o hello -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../src/configure --disable-threads 
--enable-llvm=/home/nicholas/llvm-commit --enable-checking 
--enable-debug --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu 
--enable-languages=c,c++ --prefix=/home/nicholas/llvm-gcc/install
Thread model: single
gcc version 4.2.1 (Based on Apple Inc. build 5646) (LLVM build)
 
/home/nicholas/llvm-gcc/install/libexec/gcc/i686-pc-linux-gnu/4.2.1/cc1 
-quiet -v -iprefix /usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/ 
hello.c -emit-llvm-bc -o /tmp/ccWWY8dY.o -quiet -dumpbase hello.c 
-mtune=generic -auxbase hello -O2 -version -flto
ignoring nonexistent directory 
"/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/include"
ignoring nonexistent directory 
"/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../i686-pc-linux-gnu/include"
ignoring nonexistent directory 
"/home/nicholas/llvm-gcc/install/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
  /usr/local/include
  /home/nicholas/llvm-gcc/install/include
  /home/nicholas/llvm-gcc/install/lib/gcc/i686-pc-linux-gnu/4.2.1/include
  /usr/include
End of search list.
GNU C version 4.2.1 (Based on Apple Inc. build 5646) (LLVM build) 
(i686-pc-linux-gnu)
         compiled by GNU C version 4.2.1 (Based on Apple Inc. build 
5646) (LLVM build).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=8192
Compiler executable checksum: 65429ccbcc1d011be8dcb16583873f76
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf7bf96d0 (LWP 19937)]
0x0804be6c in do_spec_1 () at gcc.c:4946
4946      const char *p = spec;
(gdb) bt
#0  0x0804be6c in do_spec_1 () at gcc.c:4946
#1  0x0804d947 in do_spec_1 () at gcc.c:5917
#2  0x0804e307 in handle_braces () at gcc.c:6252
#3  0x0804dbc3 in do_spec_1 () at gcc.c:5429
#4  0x0804e307 in handle_braces () at gcc.c:6252
#5  0x0804dbc3 in do_spec_1 () at gcc.c:5429
#6  0x0804e307 in handle_braces () at gcc.c:6252
#7  0x0804dbc3 in do_spec_1 () at gcc.c:5429
#8  0x0804e307 in handle_braces () at gcc.c:6252
#9  0x0804dbc3 in do_spec_1 () at gcc.c:5429
#10 0x0804e307 in handle_braces () at gcc.c:6252
#11 0x0804dbc3 in do_spec_1 () at gcc.c:5429
#12 0x0804e307 in handle_braces () at gcc.c:6252
#13 0x0804dbc3 in do_spec_1 () at gcc.c:5429
#14 0x0804e307 in handle_braces () at gcc.c:6252
#15 0x0804dbc3 in do_spec_1 () at gcc.c:5429
#16 0x0804e49f in do_spec_2 () at gcc.c:4775
#17 0x0804e941 in do_spec () at gcc.c:4659
#18 0x080552a7 in main () at gcc.c:7200

Nick

> Modified:
>     llvm-gcc-4.2/trunk/gcc/gcc.c
> 
> Modified: llvm-gcc-4.2/trunk/gcc/gcc.c
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/gcc.c?rev=73146&r1=73145&r2=73146&view=diff
> 
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/gcc.c (original)
> +++ llvm-gcc-4.2/trunk/gcc/gcc.c Tue Jun  9 16:22:03 2009
> @@ -720,7 +720,7 @@
>      %(linker) \
>      %{use-gold-plugin: \
>       -plugin %(gold_plugin_file) \
> -     -plugin-opt=gcc=%(gold_plugin_gcc) \
> +     -plugin-opt=as=%(gold_plugin_as) \
>      } \
>      %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %<emit-llvm %{e*}\
>      %{m} %{N} %{n} %{r}\
> @@ -777,7 +777,7 @@
>  /* LLVM LOCAL begin */
>  #ifdef ENABLE_LLVM
>  static const char *gold_plugin_file_spec = "";
> -static const char *gold_plugin_gcc_spec = "";
> +static const char *gold_plugin_as_spec = "";
>  #endif
>  /* LLVM LOCAL end */
>  static const char *link_command_spec = LINK_COMMAND_SPEC;
> @@ -1661,7 +1661,7 @@
>    /* LLVM LOCAL begin */
>  #ifdef ENABLE_LLVM
>    INIT_STATIC_SPEC ("gold_plugin_file",		&gold_plugin_file_spec),
> -  INIT_STATIC_SPEC ("gold_plugin_gcc",		&gold_plugin_gcc_spec),
> +  INIT_STATIC_SPEC ("gold_plugin_as",		&gold_plugin_as_spec),
>    INIT_STATIC_SPEC ("llvm_options",		&llvm_options),
>  #endif
>    /* LLVM LOCAL end */
> @@ -7189,7 +7189,7 @@
>  	  if (!gold_plugin_file_spec)
>  	    fatal ("-use-gold-plugin, but libLLVMgold.so not found.");
>  	}
> -      gold_plugin_gcc_spec = argv[0];
> +      gold_plugin_as_spec = find_a_file (&exec_prefixes, "as", X_OK, false);
>  #endif
>        /* LLVM LOCAL end */
>        /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
> 
> 
> _______________________________________________
> 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