From: Lawrence S. <ljs...@us...> - 2013-06-06 19:43:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 2a0ff9035fe0056897c1e1868a33896d3e35beb4 (commit) from ab5c4f3bbc7e955cb5ef5daadd604cb6556a12d7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2a0ff9035fe0056897c1e1868a33896d3e35beb4 Author: Lawrence Sebald <ljs...@us...> Date: Thu Jun 6 15:43:18 2013 -0400 Use -std=gnu99 for compiling C and -std=gnu++98 for C++. ----------------------------------------------------------------------- Summary of changes: environ_base.sh | 6 ++++++ kernel/Makefile | 3 +++ libk++/Makefile | 2 ++ 3 files changed, 11 insertions(+), 0 deletions(-) diff --git a/environ_base.sh b/environ_base.sh index d3ea09d..83b3f1b 100644 --- a/environ_base.sh +++ b/environ_base.sh @@ -27,6 +27,12 @@ export KOS_STRIP="${KOS_CC_BASE}/bin/${KOS_CC_PREFIX}-strip" export KOS_CFLAGS="${KOS_CFLAGS} ${KOS_INC_PATHS} -D_arch_${KOS_ARCH} -D_arch_sub_${KOS_SUBARCH} -Wall -g -fno-builtin -fno-strict-aliasing" export KOS_CPPFLAGS="${KOS_CPPFLAGS} ${KOS_INC_PATHS_CPP} -fno-operator-names -fno-rtti -fno-exceptions" +# Which standards modes we want to compile for +# Note that this only covers KOS itself, not necessarily anything else compiled +# with kos-cc or kos-c++. +export KOS_CSTD="-std=gnu99" +export KOS_CPPSTD="-std=gnu++98" + GCCVER="`kos-cc -v 2>&1 | tail -1 | awk '{print $3}'`" case $GCCVER in diff --git a/kernel/Makefile b/kernel/Makefile index 1701a81..1eba879 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -8,6 +8,9 @@ OBJS = SUBDIRS = arch debug fs thread net libc exports STUBS = stubs/kernel_export_stubs.o stubs/arch_export_stubs.o +# Everything from here up should be plain old C. +KOS_CFLAGS += $(KOS_CSTD) + all: subdirs $(STUBS) rm -f $(KOS_BASE)/lib/$(KOS_ARCH)/libkallisti.a kos-ar rcs $(KOS_BASE)/lib/$(KOS_ARCH)/libkallisti.a build/*.o diff --git a/libk++/Makefile b/libk++/Makefile index a13c7a3..f490973 100644 --- a/libk++/Makefile +++ b/libk++/Makefile @@ -9,6 +9,8 @@ OBJS = mem.o pure_virtual.o SUBDIRS = +KOS_CPPFLAGS += $(KOS_CPPSTD) + myall: $(OBJS) rm -f $(KOS_BASE)/lib/$(KOS_ARCH)/libk++.a $(KOS_AR) rcs $(KOS_BASE)/lib/$(KOS_ARCH)/libk++.a $(OBJS) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |