Skip to content
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

Fix compile error on ARM and GCC < 4.1.0 #46

Merged
merged 1 commit into from Aug 7, 2013

Conversation

weisslj
Copy link
Contributor

@weisslj weisslj commented Jul 18, 2013

Since b29ecbd (OTP-10418, R15B03) Erlang does not compile anymore with
old versions of GCC that do not have atomic ops builtins on platforms
where there is no native ethread implementation (e.g. ARM):

In file included from ../include/internal/gcc/ethread.h:29,
from ../include/internal/ethread.h:354,
from beam/erl_threads.h:264,
from beam/erl_smp.h:27,
from beam/sys.h:413,
from hipe/hipe_mkliterals.c:29:
../include/internal/gcc/ethr_membar.h:49:4: error: #error "No __sync_val_compare_and_swap"

This patch adds a header guard in "gcc/ethread.h", as is present in
"libatomic_ops/ethread.h".

Since b29ecbd (OTP-10418, R15B03) Erlang does not compile anymore with
old versions of GCC that do not have atomic ops builtins on platforms
where there is no native ethread implementation (e.g. ARM):

In file included from ../include/internal/gcc/ethread.h:29,
                 from ../include/internal/ethread.h:354,
                 from beam/erl_threads.h:264,
                 from beam/erl_smp.h:27,
                 from beam/sys.h:413,
                 from hipe/hipe_mkliterals.c:29:
../include/internal/gcc/ethr_membar.h:49:4: error: #error "No __sync_val_compare_and_swap"

This patch adds a header guard in "gcc/ethread.h", as is present in
"libatomic_ops/ethread.h".
@rimmius
Copy link
Contributor

rimmius commented Jul 18, 2013

Patch has passed first testings and has been assigned to be reviewed

@garazdawi
Copy link
Contributor

We will be running this through some more exhaustive tests and if they pass it will be merged for release in R16B02.

Please note however that I will be merging this branch as well, which will mean that you have to explicitly tell configure that you intend to use the fallback atomic operations though --disable-native-ethr-impls or --disable-smp-require-native-atomics.

@weisslj
Copy link
Contributor Author

weisslj commented Jul 29, 2013

Ok, thanks! I like the explicit configure switch, it is better than silently disabling native atomic ops.

@rimmius rimmius merged commit 15eba81 into erlang:maint Aug 7, 2013
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Dec 25, 2013
"Since b29ecbd (OTP-10418, R15B03) Erlang does not compile anymore with
old versions of GCC that do not have atomic ops builtins on platforms
where there is no native ethread implementation (e.g. ARM): (...)

Please note however that I will be merging this branch as well,
which will mean that you have to explicitly tell configure that
you intend to use the fallback atomic operations though
--disable-native-ethr-impls or --disable-smp-require-native-atomics."

Translated: On NetBSD-5.1 (with gcc-4.1.3) the erlang package
didn't compile because of

>  ../include/internal/gcc/ethr_membar.h:49:4: error:
>	#error "No __sync_val_compare_and_swap"

Adding the abovementioned option --disable-native-ethr-impls make the
Erlang runtime system use the original (now fallback) code. This should
maybe be an pkg option, but for now this has to do.
jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this pull request Jan 21, 2014
"Since b29ecbd (OTP-10418, R15B03) Erlang does not compile anymore with
old versions of GCC that do not have atomic ops builtins on platforms
where there is no native ethread implementation (e.g. ARM): (...)

Please note however that I will be merging this branch as well,
which will mean that you have to explicitly tell configure that
you intend to use the fallback atomic operations though
--disable-native-ethr-impls or --disable-smp-require-native-atomics."

Translated: On NetBSD-5.1 (with gcc-4.1.3) the erlang package
didn't compile because of

>  ../include/internal/gcc/ethr_membar.h:49:4: error:
>	#error "No __sync_val_compare_and_swap"

Adding the abovementioned option --disable-native-ethr-impls make the
Erlang runtime system use the original (now fallback) code. This should
maybe be an pkg option, but for now this has to do.
jperkin pushed a commit to TritonDataCenter/pkgsrc-legacy that referenced this pull request Mar 14, 2014
"Since b29ecbd (OTP-10418, R15B03) Erlang does not compile anymore with
old versions of GCC that do not have atomic ops builtins on platforms
where there is no native ethread implementation (e.g. ARM): (...)

Please note however that I will be merging this branch as well,
which will mean that you have to explicitly tell configure that
you intend to use the fallback atomic operations though
--disable-native-ethr-impls or --disable-smp-require-native-atomics."

Translated: On NetBSD-5.1 (with gcc-4.1.3) the erlang package
didn't compile because of

>  ../include/internal/gcc/ethr_membar.h:49:4: error:
>	#error "No __sync_val_compare_and_swap"

Adding the abovementioned option --disable-native-ethr-impls make the
Erlang runtime system use the original (now fallback) code. This should
maybe be an pkg option, but for now this has to do.
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Oct 11, 2014
"Since b29ecbd (OTP-10418, R15B03) Erlang does not compile anymore with
old versions of GCC that do not have atomic ops builtins on platforms
where there is no native ethread implementation (e.g. ARM): (...)

Please note however that I will be merging this branch as well,
which will mean that you have to explicitly tell configure that
you intend to use the fallback atomic operations though
--disable-native-ethr-impls or --disable-smp-require-native-atomics."

Translated: On NetBSD-5.1 (with gcc-4.1.3) the erlang package
didn't compile because of

>  ../include/internal/gcc/ethr_membar.h:49:4: error:
>	#error "No __sync_val_compare_and_swap"

Adding the abovementioned option --disable-native-ethr-impls make the
Erlang runtime system use the original (now fallback) code. This should
maybe be an pkg option, but for now this has to do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants