Project

General

Profile

Actions

Bug #16015

closed

configure couldn't enable native coroutine correctly if with parameter --target

Added by jiehe (jie he) almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
2.6.3-p62
[ruby-core:93878]

Description

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?

Actions #1

Updated by jiehe (jie he) almost 5 years ago

  • Description updated (diff)
Actions #2

Updated by nobu (Nobuyoshi Nakada) almost 5 years ago

  • Status changed from Open to Closed

Applied in changeset git|03958a0c0d0140a2c27f8e3175f9c118425c762c.


Relaxed target_os matching

When target_alias is not empty, -gnu suffixed is not stripped.

[Bug #16015]

Actions

Also available in: Atom PDF

Like0
Like0Like0