gnu: gcc: Always link against libgcc_s.so.
* gnu/packages/gcc.scm (gcc-4.7)[pre-configure]: Add snippet to #undef USE_LD_AS_NEEDED.
This commit is contained in:
		
							parent
							
								
									9ca8b5ac55
								
							
						
					
					
						commit
						65d3b7c31d
					
				
					 1 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
					@ -173,6 +173,18 @@ where the OS part is overloaded to denote a specific ABI---into GCC
 | 
				
			||||||
~a"
 | 
					~a"
 | 
				
			||||||
                           libc line))))
 | 
					                           libc line))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              ;; Use '-lgcc_s' rather than '--as-needed -lgcc_s', so that
 | 
				
			||||||
 | 
					              ;; libgcc_s.so is always found by those programs that use
 | 
				
			||||||
 | 
					              ;; 'pthread_cancel' (glibc dlopens libgcc_s.so when
 | 
				
			||||||
 | 
					              ;; pthread_cancel support is needed, but having it in the
 | 
				
			||||||
 | 
					              ;; application's RUNPATH isn't enough; see
 | 
				
			||||||
 | 
					              ;; <http://sourceware.org/ml/libc-help/2013-11/msg00023.html>.)
 | 
				
			||||||
 | 
					              ;; Also, "gcc_cv_ld_as_needed=no" as a configure flag doesn't
 | 
				
			||||||
 | 
					              ;; work.
 | 
				
			||||||
 | 
					              (substitute* "gcc/gcc.c"
 | 
				
			||||||
 | 
					                (("#ifndef USE_LD_AS_NEEDED.*$" line)
 | 
				
			||||||
 | 
					                 (string-append "#undef USE_LD_AS_NEEDED\n" line)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
              ;; Don't retain a dependency on the build-time sed.
 | 
					              ;; Don't retain a dependency on the build-time sed.
 | 
				
			||||||
              (substitute* "fixincludes/fixincl.x"
 | 
					              (substitute* "fixincludes/fixincl.x"
 | 
				
			||||||
                (("static char const sed_cmd_z\\[\\] =.*;")
 | 
					                (("static char const sed_cmd_z\\[\\] =.*;")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue