From ddb7e921d8d950d5f83ef3f7077aedb48bc40067 Mon Sep 17 00:00:00 2001 From: Slava Barinov Date: Thu, 11 Feb 2021 12:03:23 +0300 Subject: [PATCH] packaging: Enforce fpu for armv7hl build Change-Id: I1bf603e61626c76c2861423d2d73c53c49f1e9cd Signed-off-by: Slava Barinov --- packaging/gcc-aarch64.spec | 7 +++++++ packaging/gcc-armv7hl.spec | 7 +++++++ packaging/gcc-armv7l.spec | 7 +++++++ packaging/linaro-gcc.spec | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/packaging/gcc-aarch64.spec b/packaging/gcc-aarch64.spec index f3da508..87f09bb 100644 --- a/packaging/gcc-aarch64.spec +++ b/packaging/gcc-aarch64.spec @@ -766,6 +766,11 @@ fi %undefine gcc_profiledbootstrap %endif +%ifarch armv7hl +# Required for correct libgcc and crt* build +RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mfpu=neon" +%endif + %{!?gcc_skip_configure: %{?gcc_dump_configure:patch_configure.pl ..} # Add debug prints into configure CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ @@ -807,6 +812,7 @@ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \ %ifarch armv7hl --with-arch=armv7-a \ --with-tune=cortex-a8 \ + --with-fpu=neon \ --disable-sjlj-exceptions \ --with-float=hard \ %endif @@ -835,6 +841,7 @@ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \ %{?armv7hl: \ --with-arch=armv7-a \ --with-tune=cortex-a8 \ + --with-fpu=neon \ --disable-sjlj-exceptions \ --with-float=hard \ } \ diff --git a/packaging/gcc-armv7hl.spec b/packaging/gcc-armv7hl.spec index 1212199..05a3973 100644 --- a/packaging/gcc-armv7hl.spec +++ b/packaging/gcc-armv7hl.spec @@ -766,6 +766,11 @@ fi %undefine gcc_profiledbootstrap %endif +%ifarch armv7hl +# Required for correct libgcc and crt* build +RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mfpu=neon" +%endif + %{!?gcc_skip_configure: %{?gcc_dump_configure:patch_configure.pl ..} # Add debug prints into configure CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ @@ -807,6 +812,7 @@ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \ %ifarch armv7hl --with-arch=armv7-a \ --with-tune=cortex-a8 \ + --with-fpu=neon \ --disable-sjlj-exceptions \ --with-float=hard \ %endif @@ -835,6 +841,7 @@ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \ %{?armv7hl: \ --with-arch=armv7-a \ --with-tune=cortex-a8 \ + --with-fpu=neon \ --disable-sjlj-exceptions \ --with-float=hard \ } \ diff --git a/packaging/gcc-armv7l.spec b/packaging/gcc-armv7l.spec index a01cf67..2b6768a 100644 --- a/packaging/gcc-armv7l.spec +++ b/packaging/gcc-armv7l.spec @@ -766,6 +766,11 @@ fi %undefine gcc_profiledbootstrap %endif +%ifarch armv7hl +# Required for correct libgcc and crt* build +RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mfpu=neon" +%endif + %{!?gcc_skip_configure: %{?gcc_dump_configure:patch_configure.pl ..} # Add debug prints into configure CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ @@ -807,6 +812,7 @@ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \ %ifarch armv7hl --with-arch=armv7-a \ --with-tune=cortex-a8 \ + --with-fpu=neon \ --disable-sjlj-exceptions \ --with-float=hard \ %endif @@ -835,6 +841,7 @@ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \ %{?armv7hl: \ --with-arch=armv7-a \ --with-tune=cortex-a8 \ + --with-fpu=neon \ --disable-sjlj-exceptions \ --with-float=hard \ } \ diff --git a/packaging/linaro-gcc.spec b/packaging/linaro-gcc.spec index fcb1640..243c18b 100644 --- a/packaging/linaro-gcc.spec +++ b/packaging/linaro-gcc.spec @@ -763,6 +763,11 @@ fi %undefine gcc_profiledbootstrap %endif +%ifarch armv7hl +# Required for correct libgcc and crt* build +RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mfpu=neon" +%endif + %{!?gcc_skip_configure: %{?gcc_dump_configure:patch_configure.pl ..} # Add debug prints into configure CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ @@ -804,6 +809,7 @@ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \ %ifarch armv7hl --with-arch=armv7-a \ --with-tune=cortex-a8 \ + --with-fpu=neon \ --disable-sjlj-exceptions \ --with-float=hard \ %endif @@ -832,6 +838,7 @@ TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \ %{?armv7hl: \ --with-arch=armv7-a \ --with-tune=cortex-a8 \ + --with-fpu=neon \ --disable-sjlj-exceptions \ --with-float=hard \ } \ -- 2.7.4