diff options
author | Joshua Henderson <joshua.henderson@microchip.com> | 2018-04-13 13:22:34 -0700 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2018-04-15 22:13:37 +0200 |
commit | 83781f11dce6d4ef8da052253454cafcbec80dbe (patch) | |
tree | 1082392f7b34d7416207922a868c24cc59cc1c9f /package/sqlite/sqlite.mk | |
parent | 56f39e81ac0e00a0004cdbebe0ca0e2501bbdfd9 (diff) | |
download | buildroot-83781f11dce6d4ef8da052253454cafcbec80dbe.tar.gz buildroot-83781f11dce6d4ef8da052253454cafcbec80dbe.zip |
sqlite: avoid use of unsupported -Ofast CFLAGS
sqlite3 refuses to be built with -ffast-math (a side effect of -Ofast) when it
falls back to implementing its own isnan() function.
sqlite3.c: In function ‘sqlite3IsNaN’:
sqlite3.c:28554:3: error: #error SQLite will not work correctly with the -ffast-math option of GCC.
To work around this, when -Ofast is used replace with -O3.
Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/sqlite/sqlite.mk')
-rw-r--r-- | package/sqlite/sqlite.mk | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk index d0030d43ab..5ae17e17f6 100644 --- a/package/sqlite/sqlite.mk +++ b/package/sqlite/sqlite.mk @@ -39,7 +39,10 @@ ifeq ($(BR2_PACKAGE_SQLITE_NO_SYNC),y) SQLITE_CFLAGS += -DSQLITE_NO_SYNC endif -SQLITE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) $(SQLITE_CFLAGS)" +# fallback to standard -O3 when -Ofast is present to avoid -ffast-math +SQLITE_CFLAGS += $(subst -Ofast,-O3,$(TARGET_CFLAGS)) + +SQLITE_CONF_ENV = CFLAGS="$(SQLITE_CFLAGS)" ifeq ($(BR2_STATIC_LIBS),y) SQLITE_CONF_OPTS += --enable-dynamic-extensions=no |