Skip to content

Commit

Permalink
Remove duplication from specs.
Browse files Browse the repository at this point in the history
Call the compile/ferment one "compile-or-ferment".  We need that
one to serve both roles, because "cc -o foo.c".

Remove the cpp/cc1 bits from the stub and bake "pure linker specs".
  • Loading branch information
anttikantee committed Jun 24, 2015
1 parent 00014ec commit 8482a42
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion app-tools/Makefile.app-tools
Expand Up @@ -12,7 +12,7 @@ $(error ${_APPTOOLS_MISSING} not defined)
endif

APP_TOOL_FILES= cc c++ configure make gmake
APP_TOOL_FILES+= specs-ferment specs-stub specs-bake
APP_TOOL_FILES+= specs-compile_or_ferment specs-stub specs-bake

APP_TOOL_PASSTHROUGH= ar as cpp ld nm objcopy objdump ranlib readelf
APP_TOOL_PASSTHROUGH+= size strings strip
Expand Down
6 changes: 2 additions & 4 deletions app-tools/cc.in
Expand Up @@ -74,10 +74,8 @@ done

case ${MODE} in
compile)
# If we're compiling we don't really care which specs get used, might
# as well use the -bake ones.
exec ${CC} ${CFLAGS} -no-integrated-cpp \
-specs=!APPTOOLS!/rumprun-!APPTOOLS_PLATFORM!-specs-bake \
-specs=!APPTOOLS!/rumprun-!APPTOOLS_PLATFORM!-specs-compile_or_ferment \
"$@" ${EXTRALIBS}
;;
bake)
Expand All @@ -91,7 +89,7 @@ ferment)
# with no rump components. '-u main' is necessary to pull in main if the
# user is linking it in from a library.
${CC} ${CFLAGS} -no-integrated-cpp \
-specs=!APPTOOLS!/rumprun-!APPTOOLS_PLATFORM!-specs-ferment \
-specs=!APPTOOLS!/rumprun-!APPTOOLS_PLATFORM!-specs-compile_or_ferment \
-Wl,-r -Wl,-u,main \
-Wl,--defsym=__RuMpRuN_fermented__=0 \
"$@" ${EXTRALIBS} || die
Expand Down
10 changes: 0 additions & 10 deletions app-tools/specs-bake.in
@@ -1,13 +1,3 @@
%rename cpp_options old_cpp_options

*cpp_options:
-nostdinc -isystem !BASE!/rumprun/include -isystem !BASE!/rumprun/include/c++ %(old_cpp_options) !CPPFLAGS! -D__RUMPRUN__

%rename cc1_options old_cc1_options

*cc1_options:
%(old_cc1_options) -fno-stack-protector -fno-builtin-sin -fno-builtin-sinf -fno-builtin-cos -fno-builtin-cosf

*startfile:
!HEAD_OBJ! !OBJS!

Expand Down
File renamed without changes.
10 changes: 0 additions & 10 deletions app-tools/specs-stub.in
@@ -1,13 +1,3 @@
%rename cpp_options old_cpp_options

*cpp_options:
-nostdinc -isystem !BASE!/rumprun/include -isystem !BASE!/rumprun/include/c++ %(old_cpp_options) !CPPFLAGS! -D__RUMPRUN__

%rename cc1_options old_cc1_options

*cc1_options:
%(old_cc1_options) -fno-stack-protector -fno-builtin-sin -fno-builtin-sinf -fno-builtin-cos -fno-builtin-cosf

*startfile:


Expand Down

0 comments on commit 8482a42

Please sign in to comment.