Patchwork Fix checks for !TARGET_MACHO

login
register
mail settings
Submitter Tijl Coosemans
Date Jan. 17, 2012, 6:42 p.m.
Message ID <201201171942.10301.tijl@coosemans.org>
Download mbox | patch
Permalink /patch/136515/
State New
Headers show

Comments

Tijl Coosemans - Jan. 17, 2012, 6:42 p.m.
TARGET_MACHO is always defined (either 0 or 1) so using #ifndef to test
for !TARGET_MACHO is incorrect. Introduced here:
http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00623.html

The i386 case has been tested on i386-freebsd. The compiler now emits
calls to __stack_chk_fail_local again when using -fstack-protector -fpic.

The rs6000 cases are untested.

I don't have commit access, so please commit when approved.


2011-01-10  Tijl Coosemans  <tijl@coosemans.org>

	* config/i386/i386.c: Fix checks for !TARGET_MACHO.
	* config/rs6000/rs6000.c: Likewise.
Gerald Pfeifer - Jan. 18, 2012, 12:26 p.m.
On Tue, 17 Jan 2012, Tijl Coosemans wrote:
> TARGET_MACHO is always defined (either 0 or 1) so using #ifndef to test
> for !TARGET_MACHO is incorrect. Introduced here:
> http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00623.html
> 
> The i386 case has been tested on i386-freebsd. The compiler now emits
> calls to __stack_chk_fail_local again when using -fstack-protector -fpic.
> 
> The rs6000 cases are untested.
> 
> I don't have commit access, so please commit when approved.
> 
> 
> 2011-01-10  Tijl Coosemans  <tijl@coosemans.org>
> 
> 	* config/i386/i386.c: Fix checks for !TARGET_MACHO.
> 	* config/rs6000/rs6000.c: Likewise.

Reviewers, I volunteer to commit when/if approved.  (This fixes an
issue I care about. :-)

Gerald
IainS - Jan. 18, 2012, 12:49 p.m.
On 18 Jan 2012, at 12:26, Gerald Pfeifer wrote:

> On Tue, 17 Jan 2012, Tijl Coosemans wrote:
>> TARGET_MACHO is always defined (either 0 or 1) so using #ifndef to  
>> test
>> for !TARGET_MACHO is incorrect. Introduced here:
>> http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00623.html
>>
>> The i386 case has been tested on i386-freebsd. The compiler now emits
>> calls to __stack_chk_fail_local again when using -fstack-protector - 
>> fpic.
>>
>> The rs6000 cases are untested.

I'll try and fit a test in, in the next couple of days, my ppc machine  
is in a test-cycle at the moment.

equally important is to test that it doesn't mess up anything else -  
which could be done by building a cross -> powerpc-unknown-linux?

>> I don't have commit access, so please commit when approved.
>>
>>
>> 2011-01-10  Tijl Coosemans  <tijl@coosemans.org>
>>
>> 	* config/i386/i386.c: Fix checks for !TARGET_MACHO.
>> 	* config/rs6000/rs6000.c: Likewise.
>
> Reviewers, I volunteer to commit when/if approved.  (This fixes an
> issue I care about. :-)

it looks reasonable to me, but I am not able to approve (or reject) it.

Iain
Jakub Jelinek - Jan. 18, 2012, 12:50 p.m.
On Wed, Jan 18, 2012 at 01:26:29PM +0100, Gerald Pfeifer wrote:
> On Tue, 17 Jan 2012, Tijl Coosemans wrote:
> > TARGET_MACHO is always defined (either 0 or 1) so using #ifndef to test
> > for !TARGET_MACHO is incorrect. Introduced here:
> > http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00623.html
> > 
> > The i386 case has been tested on i386-freebsd. The compiler now emits
> > calls to __stack_chk_fail_local again when using -fstack-protector -fpic.
> > 
> > The rs6000 cases are untested.
> > 
> > I don't have commit access, so please commit when approved.
> > 
> > 
> > 2011-01-10  Tijl Coosemans  <tijl@coosemans.org>
> > 
> > 	* config/i386/i386.c: Fix checks for !TARGET_MACHO.
> > 	* config/rs6000/rs6000.c: Likewise.
> 
> Reviewers, I volunteer to commit when/if approved.  (This fixes an
> issue I care about. :-)

This is ok for trunk.

	Jakub

Patch

--- gcc/config/i386/i386.c
+++ gcc/config/i386/i386.c
@@ -38624,7 +38624,7 @@  ix86_autovectorize_vector_sizes (void)
 #undef TARGET_MANGLE_TYPE
 #define TARGET_MANGLE_TYPE ix86_mangle_type
 
-#ifndef TARGET_MACHO
+#if !TARGET_MACHO
 #undef TARGET_STACK_PROTECT_FAIL
 #define TARGET_STACK_PROTECT_FAIL ix86_stack_protect_fail
 #endif
--- gcc/config/rs6000/rs6000.c
+++ gcc/config/rs6000/rs6000.c
@@ -939,7 +939,7 @@  static bool legitimate_lo_sum_address_p 
 static struct machine_function * rs6000_init_machine_status (void);
 static bool rs6000_assemble_integer (rtx, unsigned int, int);
 static bool no_global_regs_above (int, bool);
-#if defined (HAVE_GAS_HIDDEN) && !defined (TARGET_MACHO)
+#if defined (HAVE_GAS_HIDDEN) && !TARGET_MACHO
 static void rs6000_assemble_visibility (tree, int);
 #endif
 static int rs6000_ra_ever_killed (void);
@@ -1387,7 +1387,7 @@  static const struct attribute_spec rs600
 #undef TARGET_ASM_INTEGER
 #define TARGET_ASM_INTEGER rs6000_assemble_integer
 
-#if defined (HAVE_GAS_HIDDEN) && !defined (TARGET_MACHO)
+#if defined (HAVE_GAS_HIDDEN) && !TARGET_MACHO
 #undef TARGET_ASM_ASSEMBLE_VISIBILITY
 #define TARGET_ASM_ASSEMBLE_VISIBILITY rs6000_assemble_visibility
 #endif
@@ -1576,7 +1576,7 @@  static const struct attribute_spec rs600
 #define TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION \
   rs6000_builtin_vectorized_function
 
-#ifndef TARGET_MACHO
+#if !TARGET_MACHO
 #undef TARGET_STACK_PROTECT_FAIL
 #define TARGET_STACK_PROTECT_FAIL rs6000_stack_protect_fail
 #endif
@@ -15515,7 +15515,7 @@  rs6000_assemble_integer (rtx x, unsigned
   return default_assemble_integer (x, size, aligned_p);
 }
 
-#if defined (HAVE_GAS_HIDDEN) && !defined (TARGET_MACHO)
+#if defined (HAVE_GAS_HIDDEN) && !TARGET_MACHO
 /* Emit an assembler directive to set symbol visibility for DECL to
    VISIBILITY_TYPE.  */