Actions
Feature #19126
openclang: Cannot compile with Control Flow Integrity (CFI)
Status:
Open
Assignee:
-
Target version:
-
Description
Maybe related #19124
Reproduction¶
sudo dnf install -y yum-utils
sudo yum-config-manager --enable crb
sudo dnf install -y \
make bc binutils-gold mold patch git bison xz autoconf automake m4 libtool pkg-config perl-interpreter \
gmp-devel openssl-devel readline-devel libyaml-devel gdbm-devel zlib-devel libffi-devel \
ncurses-devel readline-devel glibc-static glibc-devel llvm-toolset
LINKER=lld # also tried bfd and mold
FLAGS='-fsanitize=cfi'
LINKFLAGS="-fuse-ld=$LINKER -fsanitize=cfi -flto=thin -fvisibility=default" # also tried =hidden
EXE_LINKFLAGS=''
export \
CC=clang \
CXX=clang++ \
LD=$LINKER \
CPPFLAGS="$FLAGS" \
CFLAGS="$FLAGS" \
CXXFLAGS="$FLAGS" \
DCFLAGS="$FLAGS" \
XCFLAGS="$FLAGS" \
MJIT_CFLAGS="$FLAGS" \
DLDFLAGS="$FLAGS $LINKFLAGS" \
LDFLAGS="$FLAGS $LINKFLAGS" \
XLDFLAGS="$FLAGS $LINKFLAGS $EXE_LINKFLAGS"
./configure --disable-install-doc --enable-shared && \
make -j && \
make test && \
sudo make install
Output¶
compiling enc/trans/newline.c
./revision.h unchanged
compiling version.c
linking miniruby
generating encdb.h
make: *** [uncommon.mk:1178: builtin_binary.inc] Illegal instruction (core dumped)
make: *** Waiting for unfinished jobs....
make: *** [uncommon.mk:841: .rbconfig.time] Illegal instruction (core dumped)
make: *** [uncommon.mk:1129: encdb.h] Illegal instruction (core dumped)
!!! Compiling ruby 3.1.2 failed!
Updated by jeremyevans0 (Jeremy Evans) over 1 year ago
- Tracker changed from Bug to Feature
- ruby -v deleted (
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]) - Backport deleted (
2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN)
Actions
Like0
Like0