ruby-changes:50247
From: nobu <ko1@a...>
Date: Sun, 11 Feb 2018 17:57:28 +0900 (JST)
Subject: [ruby-changes:50247] nobu:r62365 (trunk): mjit.c: alwasy -fPIC flag to gcc
nobu 2018-02-11 17:57:22 +0900 (Sun, 11 Feb 2018) New Revision: 62365 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62365 Log: mjit.c: alwasy -fPIC flag to gcc Modified files: trunk/mjit.c Index: mjit.c =================================================================== --- mjit.c (revision 62364) +++ mjit.c (revision 62365) @@ -573,16 +573,19 @@ free_list(struct rb_mjit_unit_list *list https://github.com/ruby/ruby/blob/trunk/mjit.c#L573 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 #if defined __GNUC__ && !defined __clang__ - "-Wfatal-errors", "-fPIC", "-shared", "-w", +#define GCC_PIC_FLAGS "-Wfatal-errors", "-fPIC", "-shared", "-w", \ "-pipe", "-nostartfiles", "-nodefaultlibs", "-nostdlib", +#else +#define GCC_PIC_FLAGS /* empty */ #endif + +static const char *const CC_COMMON_ARGS[] = { + MJIT_CC_COMMON MJIT_CFLAGS GCC_PIC_FLAGS NULL }; -static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED NULL}; +static const char *const CC_LDSHARED_ARGS[] = {MJIT_LDSHARED GCC_PIC_FLAGS NULL}; static const char *const CC_DLDFLAGS_ARGS[] = {MJIT_DLDFLAGS NULL}; #ifdef __clang__ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/