Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[glibc] Use global RPM_OPT_FLAGS for arm builds. Contributes to JB#48210
  • Loading branch information
xfade committed Feb 6, 2020
1 parent 4989a22 commit 24af291
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions glibc.changes
@@ -1,3 +1,6 @@
* Thu Feb 06 2020 Niels Breet <niels.breet@jolla.com> - 2.30+git3
- Use global RPM_OPT_FLAGS for arm builds. Contributes to JB#48210

* Sun Feb 02 2020 Matti Kosola <matti.kosola@jolla.com> - 2.30+git2
- Revert: elf: Refuse to dlopen PIE objects. JB#48615

Expand Down
18 changes: 14 additions & 4 deletions glibc.spec
Expand Up @@ -5,7 +5,7 @@
Name: glibc

Summary: GNU C library shared libraries
Version: 2.30+git2
Version: 2.30+git3
Release: 0
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
URL: http://www.gnu.org/software/libc/
Expand Down Expand Up @@ -244,6 +244,19 @@ build_CFLAGS="$BuildFlags -O1"
build_CFLAGS="$BuildFlags -O3"
%endif

# Use RPM_OPT_FLAGS, so we use system wide optimizations
# GLIBC currently doesn't build with FORTIFY_SOURCE
# Every other flag which we filter out is already specified in this spec
# or is obsolete for our current gcc.
%ifarch %{arm}
OPT_FLAGS=`echo "$RPM_OPT_FLAGS" | sed -e "s/-O2\ //g" \
| sed -e "s/-fstack-protector\ //g" \
| sed -e "s/-Wp,-D_FORTIFY_SOURCE=2\ //g" \
| sed -e "s/--param=ssp-buffer-size=4\ //g"`

build_CFLAGS="$build_CFLAGS $OPT_FLAGS"
%endif

# Special flag to enable annobin annotations for statically linked
# assembler code. Needs to be passed to make; not preserved by
# configure.
Expand Down Expand Up @@ -277,14 +290,11 @@ build()
--enable-stack-protector=strong \
--disable-profile \
--enable-obsolete-rpc \
--disable-profile \
--enable-obsolete-rpc \
${core_with_options} \
--disable-multi-arch \
%if %{without werror}
--disable-werror \
%endif
--disable-profile \
%if %{with bootstrap}
--without-selinux \
%endif
Expand Down

0 comments on commit 24af291

Please sign in to comment.