OSDN Git Service

NPTL: fork: relief register pressure on arm thumb1
[uclinux-h8/uClibc.git] / libpthread / nptl / sysdeps / unix / sysv / linux / fork.c
index d4eaf77..af40410 100644 (file)
@@ -13,9 +13,8 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #include <assert.h>
 #include <stdlib.h>
@@ -59,6 +58,13 @@ fresetlockfiles (void)
 }
 
 pid_t
+#if defined __arm__ && defined __thumb__ && __GNUC_PREREQ (4,6)
+/* GCC PR target/53735
+ * In thumb1 we run out of registers when compiling with Os so relax that
+ * to have more registers available for spilling by using O2 here.
+ */
+attribute_optimize("O2")
+#endif
 fork (void)
 {
   pid_t pid;