Skip to content

pass cflags to transform mjit header #2059

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

ahorek
Copy link
Contributor

@ahorek ahorek commented Dec 27, 2018

@k0kubun
Copy link
Member

k0kubun commented Dec 27, 2018

Hmm, although ARCH_FLAG is added for universal binary, CFLAGS has never been used from the beginning 0af44e7 (not removed at any moment). It sounds fine to try using pass CFLAGS if it makes msys1 build succeed.

For future information, what was in your $(CFLAGS)? Can how transform_mjit_header.rb command outputs are changed before and after this patch?

@k0kubun
Copy link
Member

k0kubun commented Dec 27, 2018

I've just saw your comment in https://bugs.ruby-lang.org/issues/14964. So, -msse4.1 matters, right?

@ahorek
Copy link
Contributor Author

ahorek commented Dec 27, 2018

yes, FYI the same problem is on msys2. But only if you enable sse4 support via CFLAGS like -msse4.2 or in my case -march=native

if miniruby is compiled with this flag, running transform_mjit_header.rb without these flags causes errors like error: implicit declaration of function '__builtin_ia32_crc32qi'

according to the documentation
https://gcc.gnu.org/onlinedocs/gcc/x86-Built-in-Functions.html

The following built-in functions are available when -msse4.2 is used.
unsigned int __builtin_ia32_crc32qi (unsigned int, unsigned char)
....

these functions aren't available because -msse4.2 is ignored

@k0kubun
Copy link
Member

k0kubun commented Dec 27, 2018

if miniruby is compiled with this flag

I believe miniruby is not so related to the error here, just compiler flags used inside transform_mjit_header.rb matters.

Anyway, let me merge this and check if it works in other environments. Possibly I'll change passed-through flags to only -m* flags, but I'll try this as is first.

@matzbot matzbot closed this in 1922e6a Dec 27, 2018
@ahorek
Copy link
Contributor Author

ahorek commented Dec 27, 2018

thanks for your prompt response. I retested on ubuntu with custom flags and it seems to be ok.

@hsbt hsbt added the Backport label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants