mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 17:09:10 -07:00
dev-build/ninja: simplify LFS handling
Just append -D_FILE_OFFSET_BITS=64 to CXXFLAGS directly. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
Needed for append-lfs-flags to work.
|
||||
--- a/configure.py
|
||||
+++ b/configure.py
|
||||
@@ -261,7 +261,7 @@ configure_args = sys.argv[1:]
|
||||
if '--bootstrap' in configure_args:
|
||||
configure_args.remove('--bootstrap')
|
||||
n.variable('configure_args', ' '.join(configure_args))
|
||||
-env_keys = set(['CXX', 'AR', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS'])
|
||||
+env_keys = set(['CXX', 'AR', 'CFLAGS', 'CPPFLAGS', 'CXXFLAGS', 'LDFLAGS'])
|
||||
configure_env = dict((k, os.environ[k]) for k in os.environ if k in env_keys)
|
||||
if configure_env:
|
||||
config_str = ' '.join([k + '=' + pipes.quote(configure_env[k])
|
||||
@@ -406,6 +406,8 @@ def shell_escape(str):
|
||||
if 'CFLAGS' in configure_env:
|
||||
cflags.append(configure_env['CFLAGS'])
|
||||
ldflags.append(configure_env['CFLAGS'])
|
||||
+if 'CPPFLAGS' in configure_env:
|
||||
+ cflags.append(configure_env['CPPFLAGS'])
|
||||
if 'CXXFLAGS' in configure_env:
|
||||
cflags.append(configure_env['CXXFLAGS'])
|
||||
ldflags.append(configure_env['CXXFLAGS'])
|
||||
@@ -5,7 +5,7 @@ EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit edo bash-completion-r1 flag-o-matic python-any-r1 toolchain-funcs
|
||||
inherit edo bash-completion-r1 python-any-r1 toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
EGIT_REPO_URI="https://github.com/ninja-build/ninja.git"
|
||||
@@ -40,7 +40,6 @@ PDEPEND="
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/ninja-cflags.patch
|
||||
"${FILESDIR}"/ninja-cppflags.patch
|
||||
)
|
||||
|
||||
run_for_build() {
|
||||
@@ -48,7 +47,7 @@ run_for_build() {
|
||||
local -x AR=$(tc-getBUILD_AR)
|
||||
local -x CXX=$(tc-getBUILD_CXX)
|
||||
local -x CFLAGS=
|
||||
local -x CXXFLAGS=${BUILD_CXXFLAGS}
|
||||
local -x CXXFLAGS="${BUILD_CXXFLAGS} -D_FILE_OFFSET_BITS=64"
|
||||
local -x LDFLAGS=${BUILD_LDFLAGS}
|
||||
fi
|
||||
echo "$@" >&2
|
||||
@@ -61,7 +60,7 @@ src_compile() {
|
||||
# configure.py appends CFLAGS to CXXFLAGS
|
||||
unset CFLAGS
|
||||
|
||||
append-lfs-flags
|
||||
local -x CXXFLAGS="${CXXFLAGS} -D_FILE_OFFSET_BITS=64"
|
||||
|
||||
run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit edo bash-completion-r1 flag-o-matic python-any-r1 toolchain-funcs
|
||||
inherit edo bash-completion-r1 python-any-r1 toolchain-funcs
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
EGIT_REPO_URI="https://github.com/ninja-build/ninja.git"
|
||||
@@ -40,7 +40,6 @@ PDEPEND="
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/ninja-cflags.patch
|
||||
"${FILESDIR}"/ninja-cppflags.patch
|
||||
)
|
||||
|
||||
run_for_build() {
|
||||
@@ -48,7 +47,7 @@ run_for_build() {
|
||||
local -x AR=$(tc-getBUILD_AR)
|
||||
local -x CXX=$(tc-getBUILD_CXX)
|
||||
local -x CFLAGS=
|
||||
local -x CXXFLAGS=${BUILD_CXXFLAGS}
|
||||
local -x CXXFLAGS="${BUILD_CXXFLAGS} -D_FILE_OFFSET_BITS=64"
|
||||
local -x LDFLAGS=${BUILD_LDFLAGS}
|
||||
fi
|
||||
echo "$@" >&2
|
||||
@@ -61,7 +60,7 @@ src_compile() {
|
||||
# configure.py appends CFLAGS to CXXFLAGS
|
||||
unset CFLAGS
|
||||
|
||||
append-lfs-flags
|
||||
local -x CXXFLAGS="${CXXFLAGS} -D_FILE_OFFSET_BITS=64"
|
||||
|
||||
run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die
|
||||
|
||||
|
||||
Reference in New Issue
Block a user