CXXFLAGS=-fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem (...)/conda/include
DEBUG_CXXFLAGS=-fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem (...)/conda/include
LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,(...)/conda/lib -Wl,-rpath-link,(...)/conda/lib -L(...)/conda/lib
DEBUG_CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem (...)/conda/include
CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem (...)/conda/include
DEBUG_CPPFLAGS=-D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem (...)/conda/include
CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem (...)/conda/include
In my local tests I got:
While
-Lor-isystemare understandable, there are some flags significantly affecting the resulting binaries e.g.-DNDEBUGor optimizations level options.The
-DNDEBUGflag hits us in chipsalliance/f4pga-examples#127. It disables all the asserts in Yosys, so conda built binaries were never triggering the issue.(CC @mithro @litghost @mkurc-ant @tmichalak @tgorochowik @acomodi)