зеркало из https://github.com/github/ruby.git
mjit_config.h: include trailing comma for empty list
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
b818f7c349
Коммит
fa6e29175b
25
Makefile.in
25
Makefile.in
|
@ -542,29 +542,28 @@ mjit_config.h:
|
|||
echo '#ifndef RUBY_MJIT_CONFIG_H'; \
|
||||
echo '#define RUBY_MJIT_CONFIG_H 1'; \
|
||||
\
|
||||
set x $(CC) && shift && echo '#define MJIT_CC_COMMON "'$$1'"' \\; \
|
||||
shift && for w do echo ' , "'$$w'"' \\; done; \
|
||||
set x $(CC) && shift && echo '#define MJIT_CC_COMMON \\' && \
|
||||
for w do echo ' "'$$w'", \\'; done; \
|
||||
echo ' /* MJIT_CC_COMMON */'; \
|
||||
\
|
||||
\
|
||||
set x -w $(ARCH_FLAG) && shift && echo '#define MJIT_CFLAGS "'$$1'"' \\; \
|
||||
shift && for w do echo ' , "'$$w'"' \\; done; \
|
||||
set x -w $(ARCH_FLAG) && shift && echo '#define MJIT_CFLAGS \\' && \
|
||||
for w do echo ' "'$$w'", \\'; done; \
|
||||
echo ' /* MJIT_CFLAGS */'; \
|
||||
\
|
||||
set x $(optflags) && shift && echo '#define MJIT_OPTFLAGS "'$$1'"' \\; \
|
||||
shift && for w do echo ' , "'$$w'"' \\; done; \
|
||||
set x $(optflags) && shift && echo '#define MJIT_OPTFLAGS \\' && \
|
||||
for w do echo ' "'$$w'", \\'; done; \
|
||||
echo ' /* MJIT_OPTFLAGS */'; \
|
||||
\
|
||||
set x $(debugflags) && shift && echo '#define MJIT_DEBUGFLAGS "'$$1'"' \\; \
|
||||
shift && for w do echo ' , "'$$w'"' \\; done; \
|
||||
set x $(debugflags) && shift && echo '#define MJIT_DEBUGFLAGS \\' && \
|
||||
for w do echo ' "'$$w'", \\'; done; \
|
||||
echo ' /* MJIT_DEBUGFLAGS */'; \
|
||||
\
|
||||
set x @LDSHARED@ && shift && echo '#define MJIT_LDSHARED "'$$1'"' \\; \
|
||||
shift && for w do echo ' , "'$$w'"' \\; done; \
|
||||
set x @LDSHARED@ && shift && echo '#define MJIT_LDSHARED \\' && \
|
||||
for w do echo ' "'$$w'", \\'; done; \
|
||||
echo ' /* MJIT_LDSHARED */'; \
|
||||
\
|
||||
set x @DLDFLAGS@ && shift && echo '#define MJIT_DLDFLAGS "'$$1'"' \\; \
|
||||
shift && for w do echo ' , "'$$w'"' \\; done; \
|
||||
set x @DLDFLAGS@ && shift && echo '#define MJIT_DLDFLAGS \\' && \
|
||||
for w do echo ' "'$$w'", \\'; done; \
|
||||
echo ' /* MJIT_DLDFLAGS */'; \
|
||||
\
|
||||
echo '#endif /* RUBY_MJIT_CONFIG_H */'; \
|
||||
|
|
16
mjit.c
16
mjit.c
|
@ -561,9 +561,6 @@ free_list(struct rb_mjit_unit_list *list)
|
|||
}
|
||||
|
||||
#include "mjit_config.h"
|
||||
#ifndef MJIT_CC
|
||||
#define MJIT_CC "cc"
|
||||
#endif
|
||||
|
||||
/* XXX_COMMONN_ARGS define the command line arguments of XXX C
|
||||
compiler used by MJIT.
|
||||
|
@ -573,11 +570,11 @@ free_list(struct rb_mjit_unit_list *list)
|
|||
|
||||
XXX_USE_PCH_ARAGS define additional options to use the precomiled
|
||||
header. */
|
||||
static const char *const CC_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS, NULL};
|
||||
static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS, NULL};
|
||||
static const char *const CC_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS NULL};
|
||||
static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL};
|
||||
|
||||
static const char *const CC_COMMON_ARGS[] = {
|
||||
MJIT_CC_COMMON, MJIT_CFLAGS,
|
||||
MJIT_CC_COMMON MJIT_CFLAGS
|
||||
#if defined __GNUC__ && !defined __clang__
|
||||
"-Wfatal-errors", "-fPIC", "-shared", "-w",
|
||||
"-pipe", "-nostartfiles", "-nodefaultlibs", "-nostdlib",
|
||||
|
@ -585,11 +582,8 @@ static const char *const CC_COMMON_ARGS[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED, NULL};
|
||||
static const char *const CC_DLDFLAGS_ARGS[] = {
|
||||
MJIT_DLDFLAGS,
|
||||
NULL
|
||||
};
|
||||
static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED NULL};
|
||||
static const char *const CC_DLDFLAGS_ARGS[] = {MJIT_DLDFLAGS NULL};
|
||||
|
||||
#ifdef __clang__
|
||||
static const char GCC_USE_PCH_ARGS[] = "-include-pch";
|
||||
|
|
|
@ -1250,27 +1250,27 @@ mjit_config.h:
|
|||
<<KEEP
|
||||
@
|
||||
@(set sep=#define MJIT_CC_COMMON ) & \
|
||||
for %I in ($(CC)) do @(call echo.%%sep%%"%%~I" \& set sep= ,) >> $@
|
||||
for %I in ($(CC)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
||||
@echo /* MJIT_CC_COMMON */>> $@
|
||||
@
|
||||
@(set sep=#define MJIT_CFLAGS ) & \
|
||||
for %I in ($(RUNTIMEFLAG) $(ARCH_FLAG)) do @(call echo.%%sep%%"%%~I" \& set sep= ,) >> $@
|
||||
for %I in ($(RUNTIMEFLAG) $(ARCH_FLAG)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
||||
@echo /* MJIT_CFLAGS */>> $@
|
||||
@
|
||||
@(set sep=#define MJIT_OPTFLAGS ) & \
|
||||
for %I in ($(OPTFLAGS)) do @(call echo.%%sep%%"%%~I" \& set sep= ,) >> $@
|
||||
for %I in ($(OPTFLAGS)) do @(call echo.%%sep%%"%%~I" \& set sep= ) >> $@
|
||||
@echo /* MJIT_OPTFLAGS */>> $@
|
||||
@
|
||||
@(set sep=#define MJIT_DEBUGFLAGS ) & \
|
||||
for %I in ($(DEBUGFLAGS)) do @(call echo.%%sep%%"%%~I" \& set sep= ,) >> $@
|
||||
for %I in ($(DEBUGFLAGS)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
||||
@echo /* MJIT_DEBUGFLAGS */>> $@
|
||||
@
|
||||
@(set sep=#define MJIT_LDSHARED ) & \
|
||||
for %I in ($(LDSHARED)) do @(call echo.%%sep%%"%%~I" \& set sep= ,) >> $@
|
||||
for %I in ($(LDSHARED)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
||||
@echo /* MJIT_LDSHARED */>> $@
|
||||
@
|
||||
@(set sep=#define MJIT_DLDFLAGS ) & \
|
||||
for %I in ($(DLDFLAGS)) do @(call echo.%%sep%%"%%~I" \& set sep= ,) >> $@
|
||||
for %I in ($(DLDFLAGS)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
||||
@echo /* MJIT_DLDFLAGS */>> $@
|
||||
@
|
||||
@echo #endif /* RUBY_MJIT_CONFIG_H */>> $@
|
||||
|
|
Загрузка…
Ссылка в новой задаче