Merge pull request #88 from marineam/compile-fixes

Compile fixes for new toolchain
This commit is contained in:
Michael Marineau 2013-07-17 16:23:46 -07:00
commit 045f1a47ed
11 changed files with 51 additions and 5 deletions

View File

@ -7,7 +7,7 @@ CROS_WORKON_TREE="b21faacf6a9940571ef122363c19a1ac02595b4b"
CROS_WORKON_PROJECT="chromiumos/platform/cros_boot_mode" CROS_WORKON_PROJECT="chromiumos/platform/cros_boot_mode"
CROS_WORKON_OUTOFTREE_BUILD=1 CROS_WORKON_OUTOFTREE_BUILD=1
inherit toolchain-funcs cros-debug cros-workon inherit eutils toolchain-funcs cros-debug cros-workon
DESCRIPTION="Chrome OS platform boot mode utility" DESCRIPTION="Chrome OS platform boot mode utility"
HOMEPAGE="http://www.chromium.org/" HOMEPAGE="http://www.chromium.org/"
@ -31,6 +31,7 @@ DEPEND="${RDEPEND}
src_prepare() { src_prepare() {
cros-workon_src_prepare cros-workon_src_prepare
epatch "${FILESDIR}/${P}-fix-fstack-protector.patch"
} }
src_configure() { src_configure() {

View File

@ -0,0 +1,13 @@
diff --git a/common.mk b/common.mk
index 357d1f9..9a91c43 100644
--- a/common.mk
+++ b/common.mk
@@ -260,7 +260,7 @@ endif
# CXXFLAGS := -mahflag $(CXXFLAGS) # Prepend to the list
# CXXFLAGS := $(filter-out badflag,$(CXXFLAGS)) # Filter out a value
# The same goes for CFLAGS.
-COMMON_CFLAGS := -Wall -Werror -fstack-protector-strong -fno-strict-aliasing \
+COMMON_CFLAGS := -Wall -Werror -fstack-protector-all -fno-strict-aliasing \
-ggdb3 -Wa,--noexecstack -O1 -fvisibility=internal -Wformat=2
CXXFLAGS += $(COMMON_CFLAGS)
CFLAGS += $(COMMON_CFLAGS)

View File

@ -31,6 +31,7 @@ RDEPEND="${RDEPEND}
sys-boot/grub sys-boot/grub
sys-boot/syslinux sys-boot/syslinux
sys-devel/crossdev sys-devel/crossdev
sys-devel/sysroot-wrappers
sys-fs/dosfstools sys-fs/dosfstools
" "

View File

@ -167,7 +167,7 @@ env['CCFLAGS'] += ['-fPIC',
'-I..'] '-I..']
# Fix issue with scons not passing some vars through the environment. # Fix issue with scons not passing some vars through the environment.
for key in Split('PKG_CONFIG SYSROOT'): for key in Split('PATH PKG_CONFIG SYSROOT'):
if os.environ.has_key(key): if os.environ.has_key(key):
env['ENV'][key] = os.environ[key] env['ENV'][key] = os.environ[key]

View File

@ -0,0 +1,13 @@
diff --git a/SConstruct b/SConstruct
index 11219ed..41d12a6 100644
--- a/SConstruct
+++ b/SConstruct
@@ -31,7 +31,7 @@ def common_env():
env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
# Fix issue with scons not passing some vars through the environment.
- for key in Split('PKG_CONFIG_LIBDIR PKG_CONFIG_PATH SYSROOT'):
+ for key in Split('PATH PKG_CONFIG_LIBDIR PKG_CONFIG_PATH SYSROOT'):
if os.environ.has_key(key):
env['ENV'][key] = os.environ[key]

View File

@ -8,7 +8,7 @@ CROS_WORKON_PROJECT="chromiumos/platform/libchromeos"
LIBCHROME_VERS=( 180609 ) LIBCHROME_VERS=( 180609 )
inherit toolchain-funcs cros-debug cros-workon scons-utils inherit eutils toolchain-funcs cros-debug cros-workon scons-utils
DESCRIPTION="Chrome OS base library." DESCRIPTION="Chrome OS base library."
HOMEPAGE="http://www.chromium.org/" HOMEPAGE="http://www.chromium.org/"
@ -40,6 +40,10 @@ cr_scons() {
BASE_VER=${v} escons -C ${v} -Y "${S}" "$@" BASE_VER=${v} escons -C ${v} -Y "${S}" "$@"
} }
src_prepare() {
epatch "${FILESDIR}/${P}-preserve-path.patch"
}
src_compile() { src_compile() {
tc-export CC CXX AR RANLIB LD NM PKG_CONFIG tc-export CC CXX AR RANLIB LD NM PKG_CONFIG
cros-debug-add-NDEBUG cros-debug-add-NDEBUG

View File

@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI="4" EAPI="4"
CROS_WORKON_COMMIT="30e8455fb95d83fc6dae82a504c6d16273a7775e" CROS_WORKON_COMMIT="988c52a497b11fcffa8e4fc26c771c388e73bbcc"
CROS_WORKON_PROJECT="coreos/update_engine" CROS_WORKON_PROJECT="coreos/update_engine"
CROS_WORKON_REPO="git://github.com" CROS_WORKON_REPO="git://github.com"

View File

@ -8,7 +8,7 @@ CROS_WORKON_TREE="933dc61ef690ca77ad5557123455b289bced1865"
CROS_WORKON_PROJECT="chromiumos/platform/bootcache" CROS_WORKON_PROJECT="chromiumos/platform/bootcache"
CROS_WORKON_LOCALNAME="../platform/bootcache" CROS_WORKON_LOCALNAME="../platform/bootcache"
CROS_WORKON_OUTOFTREE_BUILD=1 CROS_WORKON_OUTOFTREE_BUILD=1
inherit cros-workon inherit eutils cros-workon
DESCRIPTION="Utility for creating store for boot cache" DESCRIPTION="Utility for creating store for boot cache"
HOMEPAGE="http://git.chromium.org/gitweb/?s=bootcache" HOMEPAGE="http://git.chromium.org/gitweb/?s=bootcache"
@ -21,6 +21,7 @@ IUSE=""
src_prepare() { src_prepare() {
cros-workon_src_prepare cros-workon_src_prepare
epatch "${FILESDIR}/${P}-fix-fstack-protector.patch"
} }
src_configure() { src_configure() {

View File

@ -0,0 +1,13 @@
diff --git a/common.mk b/common.mk
index 7533291..40d4f9d 100644
--- a/common.mk
+++ b/common.mk
@@ -276,7 +276,7 @@ endif
# CXXFLAGS := -mahflag $(CXXFLAGS) # Prepend to the list
# CXXFLAGS := $(filter-out badflag,$(CXXFLAGS)) # Filter out a value
# The same goes for CFLAGS.
-COMMON_CFLAGS-gcc := -fstack-protector-strong -fvisibility=internal -ggdb3 \
+COMMON_CFLAGS-gcc := -fstack-protector-all -fvisibility=internal -ggdb3 \
-Wa,--noexecstack
COMMON_CFLAGS-clang := -fstack-protector-all -fvisibility=hidden -ggdb
COMMON_CFLAGS := -Wall -Werror -fno-strict-aliasing -O1