Skip to content

Commit 259a90f

Browse files
committed
patch 8.0.1741: MS-Windows with msys2 cannot build Ruby statically
Problem: MS-Windows with msys2 cannot build Ruby statically. Solution: Add RUBY_VERSION to CFLAGS later. (Gray Wolf, closes #2833)
1 parent 405dadb commit 259a90f

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/Make_cyg_ming.mak‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@ RUBYINC += -I $(RUBY)/include/ruby-$(RUBY_API_VER_LONG) -I $(RUBY)/include/ruby-
458458
endif
459459
ifeq (no, $(DYNAMIC_RUBY))
460460
RUBYLIB = -L$(RUBY)/lib -l$(RUBY_INSTALL_NAME)
461-
CFLAGS += -DRUBY_VERSION=$(RUBY_VER)
462461
endif
463462

464463
endif # RUBY
@@ -538,6 +537,9 @@ ifeq (yes, $(DYNAMIC_RUBY))
538537
CFLAGS += -DDYNAMIC_RUBY -DDYNAMIC_RUBY_DLL=\"$(RUBY_INSTALL_NAME).dll\"
539538
CFLAGS += -DDYNAMIC_RUBY_VER=$(RUBY_VER)
540539
endif
540+
ifeq (no, $(DYNAMIC_RUBY))
541+
CFLAGS += -DRUBY_VERSION=$(RUBY_VER)
542+
endif
541543
ifneq ($(findstring w64-mingw32,$(CC)),)
542544
# A workaround for MinGW-w64
543545
CFLAGS += -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE

‎src/version.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1741,
764766
/**/
765767
1740,
766768
/**/

0 commit comments

Comments
 (0)