From 0895e300ed475a7471464f146422ca3ee483afab Mon Sep 17 00:00:00 2001 From: Ivan Baravy Date: Sat, 18 Nov 2017 03:24:17 +0000 Subject: [PATCH] Add -fgnu89-inline to menuetlibc related files. One can't build programs that use menuetlibc and the library itself with the latest toolchain from Serge because new GCC assumes C99 inline semantics. Fix it by passing -fgnu89-inline option to such programs. git-svn-id: svn://kolibrios.org@7112 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/libraries/menuetlibc/src/libc/Tupfile.lua | 2 +- programs/use_menuetlibc.lua | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/programs/develop/libraries/menuetlibc/src/libc/Tupfile.lua b/programs/develop/libraries/menuetlibc/src/libc/Tupfile.lua index 3803964b82..68215f3260 100644 --- a/programs/develop/libraries/menuetlibc/src/libc/Tupfile.lua +++ b/programs/develop/libraries/menuetlibc/src/libc/Tupfile.lua @@ -68,7 +68,7 @@ FOLDERS = { "termios", } -CFLAGS="-Os -fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-ident -fomit-frame-pointer -fno-asynchronous-unwind-tables -mpreferred-stack-boundary=2 -march=pentium-mmx" +CFLAGS="-Os -fno-stack-check -fno-stack-protector -mno-stack-arg-probe -fno-ident -fomit-frame-pointer -fno-asynchronous-unwind-tables -mpreferred-stack-boundary=2 -march=pentium-mmx -fgnu89-inline" OBJS={} for i,v in ipairs(FOLDERS) do tup.append_table(OBJS, diff --git a/programs/use_menuetlibc.lua b/programs/use_menuetlibc.lua index c135e8a18d..dcb52a0c08 100644 --- a/programs/use_menuetlibc.lua +++ b/programs/use_menuetlibc.lua @@ -2,6 +2,7 @@ MELIBC = tup.getcwd() .. "/develop/libraries/menuetlibc" INCLUDES = INCLUDES .. " -I" .. MELIBC .. "/include" STARTUP = MELIBC .. "/stub/crt0.o" +CFLAGS_c = " -fgnu89-inline" LDFLAGS = LDFLAGS .. string.gsub(" -T$/include/scripts/menuetos_app_v01.ld -L$/lib", "%$", MELIBC) tup.append_table(LIBDEPS, {MELIBC .. "/", MELIBC .. "/", MELIBC .. "/"}) LIBS = LIBS .. " -lcpp -lm -lc"