[ruby-core:93878] [Ruby master Bug#16015] configure couldn't enable native coroutine correctly if with parameter --target

From: jie1.he@...
Date: 2019-07-23 05:34:36 UTC
List: ruby-core #93878
Issue #16015 has been reported by jiehe (jie he).

----------------------------------------
Bug #16015: configure couldn't enable native coroutine correctly if with parameter --target
https://bugs.ruby-lang.org/issues/16015

* Author: jiehe (jie he)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.3-p62
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
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?








-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next