Skip to content
Commit 128a16ac authored by Francois Perrad's avatar Francois Perrad Committed by Arnout Vandecappelle (Essensium/Mind)
Browse files

ficl: fix build with gcc 7

gcc 7 with -Os (optimize for size) takes the liberty to remove the code
of inline functions entirely - which is indeed allowed according to the
C99 standard, cfr. this [1] very complete StackOverflow answer. This
leads to undefined function references at link time.

The proper approach is to patch the code to use 'static inline'
instead. However, for various reasons such a patch is not entirely
trivial, and upstream has not moved since 7 years, so instead take the
simpler approach of restoring the gcc original inline behaviour with
-fgnu89-inline to fix this issue.

Fixes http://autobuild.buildroot.org/results/d72/d72a7e9775a10bc884b9953dd2eba3ad32100cca

[1] https://stackoverflow.com/questions/6312597/is-inline-without-static-or-extern-ever-useful-in-c99



Signed-off-by: default avatarFrancois Perrad <francois.perrad@gadz.org>
Signed-off-by: default avatarArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
parent d2f0f5df
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment