Skip to content

Commit

Permalink
Fix broken build under Debian Wheezy.
Browse files Browse the repository at this point in the history
With the toolchain under Wheezy (GCC 4.7.2 and binutils 2.22), using
both -fPIE and -fPIC does not create pic object files, which the build
of Bazel seems to expect as of ee8fcd3.

--
Change-Id: I0a33d1bc6dc0e3cdcffb473d4e78dac1a6b8ab41
Reviewed-on: https://bazel-review.googlesource.com/#/c/1690/
MOS_MIGRATED_REVID=104093416
  • Loading branch information
bsilver8192 authored and kchodorow committed Sep 28, 2015
1 parent 8fcfbe8 commit 4e7ed50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 9 additions & 0 deletions src/main/cpp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ cc_library(
"blaze_util.h",
"blaze_util_platform.h",
],
linkopts = select({
"//src:darwin": [
],
"//src:freebsd": [
],
"//conditions:default": [
"-lrt",
],
}),
visibility = ["//visibility:public"],
deps = [
"//src/main/cpp/util",
Expand Down
5 changes: 0 additions & 5 deletions tools/cpp/CROSSTOOL
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ toolchain {
compiler_flag: "-U_FORTIFY_SOURCE"
compiler_flag: "-D_FORTIFY_SOURCE=1"
compiler_flag: "-fstack-protector"
compiler_flag: "-fPIE"
linker_flag: "-pie"
linker_flag: "-Wl,-z,relro,-z,now"

# Enable coloring even if there's no attached terminal. Bazel removes the
Expand Down Expand Up @@ -272,7 +270,6 @@ toolchain {
# Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
compiler_flag: "-D_FORTIFY_SOURCE=1"
compiler_flag: "-fstack-protector"
compiler_flag: "-fPIE"

# Enable coloring even if there's no attached terminal. Bazel removes the
# escape sequences if --nocolor is specified.
Expand Down Expand Up @@ -380,8 +377,6 @@ toolchain {
compiler_flag: "-U_FORTIFY_SOURCE"
compiler_flag: "-D_FORTIFY_SOURCE=1"
compiler_flag: "-fstack-protector"
compiler_flag: "-fPIE"
linker_flag: "-pie"
linker_flag: "-Wl,-z,relro,-z,now"

# Enable coloring even if there's no attached terminal. Bazel removes the
Expand Down

0 comments on commit 4e7ed50

Please sign in to comment.