mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
include/ruby/intern.h: don't modify MJIT_FUNC_EXPORTED
on most of platforms except mswin. Changing it to static was needed for mswin because it doesn't use transform_mjit_header, but for platforms that use it, it causes link error like: /usr/bin/ld: /tmp/_ruby_mjit_p21652u0.o: relocation R_X86_64_PC32 against undefined symbol `rb_vm_search_method_slowpath' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status include/ruby/defines.h: MJIT_FUNC_EXPORTED moved to intern.h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d590027fd2
commit
fd719c59e9
2 changed files with 6 additions and 4 deletions
|
@ -361,6 +361,11 @@ ruby_xrealloc2_with_location(void *ptr, size_t s1, size_t s2, const char *file,
|
|||
#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
|
||||
#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
|
||||
|
||||
#if defined(MJIT_HEADER) && defined(_MSC_VER)
|
||||
# undef MJIT_FUNC_EXPORTED
|
||||
# define MJIT_FUNC_EXPORTED static
|
||||
#endif
|
||||
|
||||
#ifndef RUBY_EXTERN
|
||||
#define RUBY_EXTERN extern
|
||||
#endif
|
||||
|
|
|
@ -36,12 +36,9 @@ extern "C" {
|
|||
|
||||
/* On mswin, MJIT header transformation can't be used since cl.exe can't output
|
||||
preprocessed output preserving macros. So this `MJIT_STATIC` is needed
|
||||
to force non-static function to static on MJIT header to avoid symbol conflict.
|
||||
`MJIT_FUNC_EXPORTED` is also changed to `static` on MJIT header for the same reason. */
|
||||
to force non-static function to static on MJIT header to avoid symbol conflict. */
|
||||
#ifdef MJIT_HEADER
|
||||
# define MJIT_STATIC static
|
||||
# undef MJIT_FUNC_EXPORTED
|
||||
# define MJIT_FUNC_EXPORTED static
|
||||
#else
|
||||
# define MJIT_STATIC
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue