new: clear CFLAGS in gcc and glibc

This commit is contained in:
wyj
2025-03-25 13:56:59 -04:00
parent 9d6c26af0f
commit 0dfb2a7276
2 changed files with 19 additions and 1 deletions
+13
View File
@@ -26,6 +26,9 @@ src_prepare() {
}
src_build() {
old_cflags="$CFLAGS"
unset CFLAGS
mkdir -pv build
cd build
echo "rootsbindir=/usr/sbin" > configparms
@@ -36,6 +39,8 @@ src_build() {
--disable-nscd \
libc_cv_slibdir=/usr/lib
make
export CFLAGS="$old_cflags"
}
_skip_test() {
@@ -46,10 +51,16 @@ _skip_test() {
src_check() {
_skip_test tst-lchmod io/Makefile
old_cflags="$CFLAGS"
unset CFLAGS
make check
export CFLAGS="$old_cflags"
}
src_install() {
old_cflags="$CFLAGS"
unset CFLAGS
cd "${srcdir}/build"
install -d "${pkgdir}/etc"
touch "${pkgdir}/etc/ld.so.conf"
@@ -110,6 +121,8 @@ src_install() {
unset ZONEINFO
install -m644 "${distdir}/${sources[3]}" "${pkgdir}/etc/ld.so.conf"
export CFLAGS="$old_cflags"
}
src_preinstall() {