+--- libgcc/config/arm/linux-atomic.c (.../tags/gcc_4_7_3_release) (revision 198690)
++++ libgcc/config/arm/linux-atomic.c (.../branches/gcc-4_7-branch) (revision 198690)
+@@ -97,19 +97,19 @@
+ return (RETURN & mask) >> shift; \
+ }
+
+-SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval)
+-SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval)
+-SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval)
+-SUBWORD_SYNC_OP (and, , &, unsigned short, 2, oldval)
+-SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, oldval)
+-SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, oldval)
++SUBWORD_SYNC_OP (add, , +, short, 2, oldval)
++SUBWORD_SYNC_OP (sub, , -, short, 2, oldval)
++SUBWORD_SYNC_OP (or, , |, short, 2, oldval)
++SUBWORD_SYNC_OP (and, , &, short, 2, oldval)
++SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval)
++SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval)
+
+-SUBWORD_SYNC_OP (add, , +, unsigned char, 1, oldval)
+-SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, oldval)
+-SUBWORD_SYNC_OP (or, , |, unsigned char, 1, oldval)
+-SUBWORD_SYNC_OP (and, , &, unsigned char, 1, oldval)
+-SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, oldval)
+-SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, oldval)
++SUBWORD_SYNC_OP (add, , +, signed char, 1, oldval)
++SUBWORD_SYNC_OP (sub, , -, signed char, 1, oldval)
++SUBWORD_SYNC_OP (or, , |, signed char, 1, oldval)
++SUBWORD_SYNC_OP (and, , &, signed char, 1, oldval)
++SUBWORD_SYNC_OP (xor, , ^, signed char, 1, oldval)
++SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, oldval)
+
+ #define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \
+ int HIDDEN \
+@@ -132,19 +132,19 @@
+ OP_AND_FETCH_WORD (xor, , ^)
+ OP_AND_FETCH_WORD (nand, ~, &)
+
+-SUBWORD_SYNC_OP (add, , +, unsigned short, 2, newval)
+-SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, newval)
+-SUBWORD_SYNC_OP (or, , |, unsigned short, 2, newval)
+-SUBWORD_SYNC_OP (and, , &, unsigned short, 2, newval)
+-SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, newval)
+-SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, newval)
++SUBWORD_SYNC_OP (add, , +, short, 2, newval)
++SUBWORD_SYNC_OP (sub, , -, short, 2, newval)
++SUBWORD_SYNC_OP (or, , |, short, 2, newval)
++SUBWORD_SYNC_OP (and, , &, short, 2, newval)
++SUBWORD_SYNC_OP (xor, , ^, short, 2, newval)
++SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval)
+
+-SUBWORD_SYNC_OP (add, , +, unsigned char, 1, newval)
+-SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, newval)
+-SUBWORD_SYNC_OP (or, , |, unsigned char, 1, newval)
+-SUBWORD_SYNC_OP (and, , &, unsigned char, 1, newval)
+-SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, newval)
+-SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, newval)
++SUBWORD_SYNC_OP (add, , +, signed char, 1, newval)
++SUBWORD_SYNC_OP (sub, , -, signed char, 1, newval)
++SUBWORD_SYNC_OP (or, , |, signed char, 1, newval)
++SUBWORD_SYNC_OP (and, , &, signed char, 1, newval)
++SUBWORD_SYNC_OP (xor, , ^, signed char, 1, newval)
++SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, newval)
+
+ int HIDDEN
+ __sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval)
+@@ -181,7 +181,7 @@
+ actual_oldval = *wordptr; \
+ \
+ if (__builtin_expect (((actual_oldval & mask) >> shift) != \
+- (unsigned int) oldval, 0)) \
++ ((unsigned int) oldval & MASK_##WIDTH), 0)) \
+ return (actual_oldval & mask) >> shift; \
+ \
+ actual_newval = (actual_oldval & ~mask) \
+@@ -195,8 +195,8 @@
+ } \
+ }
+
+-SUBWORD_VAL_CAS (unsigned short, 2)
+-SUBWORD_VAL_CAS (unsigned char, 1)
++SUBWORD_VAL_CAS (short, 2)
++SUBWORD_VAL_CAS (signed char, 1)
+
+ typedef unsigned char bool;
+
+@@ -217,8 +217,8 @@
+ return (oldval == actual_oldval); \
+ }
+
+-SUBWORD_BOOL_CAS (unsigned short, 2)
+-SUBWORD_BOOL_CAS (unsigned char, 1)
++SUBWORD_BOOL_CAS (short, 2)
++SUBWORD_BOOL_CAS (signed char, 1)
+
+ void HIDDEN
+ __sync_synchronize (void)
+@@ -260,8 +260,8 @@
+ return (oldval & mask) >> shift; \
+ }
+
+-SUBWORD_TEST_AND_SET (unsigned short, 2)
+-SUBWORD_TEST_AND_SET (unsigned char, 1)
++SUBWORD_TEST_AND_SET (short, 2)
++SUBWORD_TEST_AND_SET (signed char, 1)
+
+ #define SYNC_LOCK_RELEASE(TYPE, WIDTH) \
+ void HIDDEN \
+Index: gcc/doc/tm.texi
+===================================================================
+--- gcc/doc/tm.texi (.../tags/gcc_4_7_3_release) (revision 198690)
++++ gcc/doc/tm.texi (.../branches/gcc-4_7-branch) (revision 198690)
+@@ -9495,6 +9495,10 @@
+ True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted. These sections are not used on most platforms, and in particular GDB does not use them.
+ @end deftypevr
+
++@deftypevr {Target Hook} bool TARGET_FORCE_AT_COMP_DIR
++True if the @code{DW_AT_comp_dir} attribute should be emitted for each compilation unit. This attribute is required for the darwin linker to emit debug information.
++@end deftypevr
++
+ @deftypevr {Target Hook} bool TARGET_DELAY_SCHED2
+ True if sched2 is not to be run at its normal place. This usually means it will be run as part of machine-specific reorg.
+ @end deftypevr
+Index: gcc/doc/tm.texi.in
+===================================================================
+--- gcc/doc/tm.texi.in (.../tags/gcc_4_7_3_release) (revision 198690)
++++ gcc/doc/tm.texi.in (.../branches/gcc-4_7-branch) (revision 198690)
+@@ -9388,6 +9388,8 @@
+
+ @hook TARGET_WANT_DEBUG_PUB_SECTIONS
+
++@hook TARGET_FORCE_AT_COMP_DIR
++
+ @hook TARGET_DELAY_SCHED2
+
+ @hook TARGET_DELAY_VARTRACK
+Index: gcc/target.def
+===================================================================
+--- gcc/target.def (.../tags/gcc_4_7_3_release) (revision 198690)
++++ gcc/target.def (.../branches/gcc-4_7-branch) (revision 198690)
+@@ -2758,6 +2758,13 @@
+ bool, false)
+
+ DEFHOOKPOD
++(force_at_comp_dir,
++ "True if the @code{DW_AT_comp_dir} attribute should be emitted for each \
++ compilation unit. This attribute is required for the darwin linker \
++ to emit debug information.",
++ bool, false)
++
++DEFHOOKPOD
+ (delay_sched2, "True if sched2 is not to be run at its normal place. \
+ This usually means it will be run as part of machine-specific reorg.",
+ bool, false)
+Index: gcc/DATESTAMP
+===================================================================
+--- gcc/DATESTAMP (.../tags/gcc_4_7_3_release) (revision 198690)
++++ gcc/DATESTAMP (.../branches/gcc-4_7-branch) (revision 198690)
+@@ -1 +1 @@
+-20130411
++20130507
+Index: gcc/builtins.c
+===================================================================
+--- gcc/builtins.c (.../tags/gcc_4_7_3_release) (revision 198690)
++++ gcc/builtins.c (.../branches/gcc-4_7-branch) (revision 198690)
+@@ -9692,7 +9692,16 @@
+ case rvc_inf:
+ /* If arg is Inf or NaN and we're logb, return it. */
+ if (TREE_CODE (rettype) == REAL_TYPE)
+- return fold_convert_loc (loc, rettype, arg);
++ {
++ /* For logb(-Inf) we have to return +Inf. */
++ if (real_isinf (value) && real_isneg (value))
++ {
++ REAL_VALUE_TYPE tem;
++ real_inf (&tem);
++ return build_real (rettype, tem);
++ }
++ return fold_convert_loc (loc, rettype, arg);
++ }
+ /* Fall through... */
+ case rvc_zero:
+ /* Zero may set errno and/or raise an exception for logb, also