Skip to content

Instantly share code, notes, and snippets.

@AndreVallestero
Last active December 5, 2019 21:18
Show Gist options
  • Save AndreVallestero/2236a3852bbf8f88d826c76a3fba51ee to your computer and use it in GitHub Desktop.
Save AndreVallestero/2236a3852bbf8f88d826c76a3fba51ee to your computer and use it in GitHub Desktop.
GCC CFLAGS CCFLAGS CXXFLAGS LDFLAGS
GCC CFLAGS CCFLAGS CXXFLAGS LDFLAGS
# -Wl,-O1 is unstable on rk3399
Performance
CFLAGS="-march=native -mtune=native -Ofast -pipe -fno-plt -fvisibility=hidden -flto -Wl,-lfto -s"
LDFLAGS="-Wl,--hash-style=both -Wl,-znow -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--relax -Wl,--enable-new-dtags -Wl,-flto -Wl,-s"
Debug
CFLAGS="-march=native -g3 -ggdb3 -Og -fvisibility=default"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment