From 9a5f6a45c65493b5d020fde927aaf19313be882e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 26 Nov 2024 01:22:38 +0900 Subject: [PATCH] Fix up gc/extconf_base.rb - Add flags to appropriate variables. - Use `append_cflags` to append a flag safely, instead of appending blindly. --- gc/extconf_base.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gc/extconf_base.rb b/gc/extconf_base.rb index 99183a3033..7ecbc184ac 100644 --- a/gc/extconf_base.rb +++ b/gc/extconf_base.rb @@ -3,10 +3,11 @@ require "mkmf" srcdir = File.join(__dir__, "..") -$CFLAGS << " -I#{srcdir}" +$INCFLAGS << " -I#{srcdir}" -$CFLAGS << " -DBUILDING_SHARED_GC" -$CFLAGS << " -fPIC" +$CPPFLAGS << " -DBUILDING_SHARED_GC" + +append_cflags("-fPIC") def create_gc_makefile(name) create_makefile("librubygc.#{name}")