summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSemun Lee <semun.lee@samsung.com>2020-07-17 18:27:47 +0900
committerYongjoo Ahn <yongjoo1.ahn@samsung.com>2022-12-02 16:37:25 +0900
commitfb8cba6dab6f62139683e72f6852e05f9dec8fb5 (patch)
tree5d71b9cb09abbaa4d2ff15af9a3627d58e84f667
parent9a2b12682cb2090d35f23f547264b3a2f5f6fb83 (diff)
downloadflatbuffers-fb8cba6dab6f62139683e72f6852e05f9dec8fb5.tar.gz
flatbuffers-fb8cba6dab6f62139683e72f6852e05f9dec8fb5.tar.bz2
flatbuffers-fb8cba6dab6f62139683e72f6852e05f9dec8fb5.zip
Add -fno-lto for creating static library
When -flto option is used, static library doesn't contain symbol names in it. It may leads "undefined symbol" problem in some applications. Change-Id: I3ab5f644b72e504d9390311e4ce945d9ac28527e Signed-off-by: Semun Lee <semun.lee@samsung.com>
-rw-r--r--packaging/flatbuffers.spec3
1 files changed, 3 insertions, 0 deletions
diff --git a/packaging/flatbuffers.spec b/packaging/flatbuffers.spec
index 36debb7d..4e1d495d 100644
--- a/packaging/flatbuffers.spec
+++ b/packaging/flatbuffers.spec
@@ -29,6 +29,9 @@ This package provides headers and other miscellaneous files required to use flat
cp %{SOURCE1} .
%build
+export CFLAGS+=" -fno-lto"
+export CXXFLAGS+=" -fno-lto"
+
# flatbuffers build occasionally fails when using -j${BUILD_THREADS} with an error similar to:
# /mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:19:17: error: 'MyGame' has not been declared
# /mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:19:25: error: 'Sample' is not a namespace-name