diff options
author | Semun Lee <semun.lee@samsung.com> | 2020-07-17 18:27:47 +0900 |
---|---|---|
committer | Gichan Jang <gichan2.jang@samsung.com> | 2021-05-13 11:42:22 +0900 |
commit | 156062ec58147630edd8432517dc3d2a0ba071f8 (patch) | |
tree | 542ad7452eb351c2f3e32ea01d944aead71f821e | |
parent | 66fdd725e7dd7ad3ce30fec591a2b339f94e5d96 (diff) | |
download | flatbuffers-156062ec58147630edd8432517dc3d2a0ba071f8.tar.gz flatbuffers-156062ec58147630edd8432517dc3d2a0ba071f8.tar.bz2 flatbuffers-156062ec58147630edd8432517dc3d2a0ba071f8.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.spec | 3 |
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 |