ruby-changes:50244
From: nobu <ko1@a...>
Date: Sun, 11 Feb 2018 16:10:42 +0900 (JST)
Subject: [ruby-changes:50244] nobu:r62362 (trunk): mjit_config.h: include trailing comma for empty list
nobu 2018-02-11 16:10:37 +0900 (Sun, 11 Feb 2018) New Revision: 62362 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62362 Log: mjit_config.h: include trailing comma for empty list Modified files: trunk/Makefile.in trunk/mjit.c trunk/win32/Makefile.sub Index: Makefile.in =================================================================== --- Makefile.in (revision 62361) +++ Makefile.in (revision 62362) @@ -542,29 +542,28 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/Makefile.in#L542 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 */'; \ Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 62361) +++ win32/Makefile.sub (revision 62362) @@ -1250,27 +1250,27 @@ mjit_config.h: https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1250 <<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 */>> $@ Index: mjit.c =================================================================== --- mjit.c (revision 62361) +++ mjit.c (revision 62362) @@ -561,9 +561,6 @@ free_list(struct rb_mjit_unit_list *list https://github.com/ruby/ruby/blob/trunk/mjit.c#L561 } #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 https://github.com/ruby/ruby/blob/trunk/mjit.c#L570 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[ https://github.com/ruby/ruby/blob/trunk/mjit.c#L582 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"; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/