Project

General

Profile

Bug #16015

Updated by jiehe (jie he) almost 5 years ago

reproduction steps :  

 building ruby on Intel i7, 

 ./configure --build=x86_64-generic-linux-gnu --host=x86_64-generic-linux-gnu --target=x86_64-clr-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/bin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --disable-static --prefix=/usr --enable-shared --disable-rpath --with-dbm-type=gdbm_compat --with-out-ext=tcl --with-out-ext=tk 

 expected result:  

 configure output should include "checking native coroutine implementation for x86_64-linux-gnu... amd64" 

 actual result :  

 checking native coroutine implementation for x86_64-linux-gnu... no 



 I am trying to build ruby 2.6.3 downloaded from github. 

 Once I executed “configure --target x86_64-clr-linux-gnu”, configure couldn’t enable the native coroutine for amd64, because the target_os is recognized as “linux-gnu”, not “linux”. 

 

 In configure.ac, for enable native coroutine for amd64, target_os have to be “linux”, 

 

        AS_CASE(["$target_cpu-$target_os"], 

                        [x*64-darwin*], [ 

                            rb_cv_coroutine=amd64 

                        ], 

                        [x*64-linux], [ 

                            AS_CASE(["$ac_cv_sizeof_voidp"], 

                                [8], [ rb_cv_coroutine=amd64 ], 

                                [4], [ rb_cv_coroutine=x86 ], 

                                [*], [ rb_cv_coroutine= ] 

                            ) 

                        ], 

                      

 but if with --target xxxx, the sed command in the following section (from configure source code) shouldn't work. 

 the sed command should replace linux-gnu to linux. 

 

     

 

 # The aliases save the names the user supplied, while $host etc. 

     

 # will get canonicalized. 

     

 test -n "$target_alias" && 

     

   test "$program_prefix$program_suffix$program_transform_name" = \ 

         

     NONENONEs,x,x, && 

         

   program_prefix=${target_alias}- 

     

 test x"$target_alias" = x && 

     

 target_os=`echo $target_os | sed 's/linux-gnu$/linux/;s/linux-gnu/linux-/'` 

 

 so the question is if the match patten code in configure.ac is not enough for matching all linux OS alias? 




Back