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

Consider move TUNE_CCARGS:remove = "-mbranch-protection=standard" to conf file #998

Closed
Oiouuu opened this issue Aug 13, 2024 · 7 comments
Closed

Comments

@Oiouuu
Copy link
Contributor

Oiouuu commented Aug 13, 2024

Hi, why not place the changes to TUNE_CCARGS in the conf file?
This change should affect the global CFLAGS. If it's only set in libcxx_git.bb, other packages won’t be affected.
I found that when building other packages, the cxx exception feature doesn’t work properly on aarch64.
It only works if
TUNE_CCARGS:remove:toolchain-clang = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '-mbranch-protection=standard', '', d)}"
is added globally.

@kraj
Copy link
Owner

kraj commented Aug 14, 2024

#963 reported this issue and fixing C++ runtime was enough to solve that case. However if you are seeing more issues with it then we might want to use it globally infact for all the distros using clang + gcc to build packages will show similar issue on arm64. Can you add a package where this happens and removing it helps ?

@Oiouuu
Copy link
Contributor Author

Oiouuu commented Aug 15, 2024

Here is an example vsomip. You can see that Boost is used to load the configuration file with 'try-catch'. Sure I can remove TUNE_FEATURES in vsomeip.bb, but it's a runtime issue so I can't test all packages.

@quaresmajose
Copy link
Contributor

I am seeing the same in my distro.
I thought #968 would solve the problem but it didn't and we continue to have problems with the exceptions in runtime.
I will also test #999 to see the result.

We had to revert again foundriesio/meta-lmp#1500 and apply our fix globally

TUNE_CCARGS:remove:toolchain-clang = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '-mbranch-protection=standard', '', d)}"

@Oiouuu
Copy link
Contributor Author

Oiouuu commented Aug 19, 2024

I am seeing the same in my distro. I thought #968 would solve the problem but it didn't and we continue to have problems with the exceptions in runtime. I will also test #999 to see the result.

We had to revert again foundriesio/meta-lmp#1500 and apply our fix globally

TUNE_CCARGS:remove:toolchain-clang = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '-mbranch-protection=standard', '', d)}"

#999 doesn't work, I tried ... :(

@quaresmajose
Copy link
Contributor

I am seeing the same in my distro. I thought #968 would solve the problem but it didn't and we continue to have problems with the exceptions in runtime. I will also test #999 to see the result.
We had to revert again foundriesio/meta-lmp#1500 and apply our fix globally

TUNE_CCARGS:remove:toolchain-clang = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '-mbranch-protection=standard', '', d)}"

#999 doesn't work, I tried ... :(

I was hoping it would work, this way it becomes more difficult and perhaps applying the '-mbranch-protection=standard' removal on arm64 globally is the most appropriate.

@quaresmajose
Copy link
Contributor

I have finished my tests and unfortnly the #999 doesn't fix the runtimes exceptions.
I will propose a PR with a global '-mbranch-protection=standard' removal for arm64 since the libcxx alone is not enough.
However, I don't know which is the most appropriate place for this, would conf/layer.conf or conf/nonclangable.conf be preferable? looks like the conf/nonclangable.conf is more package related.

quaresmajose added a commit to quaresmajose/meta-clang that referenced this issue Aug 20, 2024
On aarch64 the handling of runtime exception is broken when build with clang.
There is currently a fix for libcxx on the layer but it is not enough and this
same fix needs to be applied globally.

First fix attempt just include libcxx:
kraj#963
kraj#968

Remaining reported issue:
kraj#998

Signed-off-by: Jose Quaresma <[email protected]>
quaresmajose added a commit to quaresmajose/meta-clang that referenced this issue Aug 20, 2024
On aarch64 the handling of runtime exception is broken when build with clang.
There is currently a fix for libcxx on the layer but it is not enough and this
same fix needs to be applied globally.

First fix attempt just include libcxx:
kraj#963
kraj#968

Remaining reported issue:
kraj#998

Signed-off-by: Jose Quaresma <[email protected]>
quaresmajose added a commit to quaresmajose/meta-clang that referenced this issue Aug 21, 2024
On aarch64 the handling of runtime exception is broken when build with clang.
There is currently a fix for libcxx on the layer but it is not enough and this
same fix needs to be applied globally.

First fix attempt just include libcxx:
kraj#963
kraj#968

Remaining reported issue:
kraj#998

Signed-off-by: Jose Quaresma <[email protected]>
kraj pushed a commit that referenced this issue Aug 21, 2024
On aarch64 the handling of runtime exception is broken when build with clang.
There is currently a fix for libcxx on the layer but it is not enough and this
same fix needs to be applied globally.

First fix attempt just include libcxx:
#963
#968

Remaining reported issue:
#998

Signed-off-by: Jose Quaresma <[email protected]>
quaresmajose added a commit to quaresmajose/meta-clang that referenced this issue Aug 21, 2024
On aarch64 the handling of runtime exception is broken when build with clang.
There is currently a fix for libcxx on the layer but it is not enough and this
same fix needs to be applied globally.

First fix attempt just include libcxx:
kraj#963
kraj#968

Remaining reported issue:
kraj#998

Signed-off-by: Jose Quaresma <[email protected]>
(cherry picked from commit ee30860)
Signed-off-by: Jose Quaresma <[email protected]>
quaresmajose added a commit to quaresmajose/meta-clang that referenced this issue Aug 21, 2024
On aarch64 the handling of runtime exception is broken when build with clang.
There is currently a fix for libcxx on the layer but it is not enough and this
same fix needs to be applied globally.

First fix attempt just include libcxx:
kraj#963
kraj#968

Remaining reported issue:
kraj#998

Signed-off-by: Jose Quaresma <[email protected]>
(cherry picked from commit ee30860)
Signed-off-by: Jose Quaresma <[email protected]>
@quaresmajose
Copy link
Contributor

fixed with #1000

kraj pushed a commit that referenced this issue Aug 21, 2024
On aarch64 the handling of runtime exception is broken when build with clang.
There is currently a fix for libcxx on the layer but it is not enough and this
same fix needs to be applied globally.

First fix attempt just include libcxx:
#963
#968

Remaining reported issue:
#998

Signed-off-by: Jose Quaresma <[email protected]>
(cherry picked from commit ee30860)
Signed-off-by: Jose Quaresma <[email protected]>
kraj pushed a commit that referenced this issue Aug 21, 2024
On aarch64 the handling of runtime exception is broken when build with clang.
There is currently a fix for libcxx on the layer but it is not enough and this
same fix needs to be applied globally.

First fix attempt just include libcxx:
#963
#968

Remaining reported issue:
#998

Signed-off-by: Jose Quaresma <[email protected]>
(cherry picked from commit ee30860)
Signed-off-by: Jose Quaresma <[email protected]>
@Oiouuu Oiouuu closed this as completed Aug 23, 2024
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/meta-clang that referenced this issue Aug 27, 2024
Source: meta-clang
MR: 158405
Type: Integration
Disposition: Merged from meta-clang
ChangeID: bff7fe1
Description:

On aarch64 the handling of runtime exception is broken when build with clang.
There is currently a fix for libcxx on the layer but it is not enough and this
same fix needs to be applied globally.

First fix attempt just include libcxx:
kraj/meta-clang#963
kraj/meta-clang#968

Remaining reported issue:
kraj/meta-clang#998

Signed-off-by: Jose Quaresma <[email protected]>
(cherry picked from commit ee30860)
Signed-off-by: Jose Quaresma <[email protected]>
Signed-off-by: Jeremy A. Puhlman <[email protected]>
@Oiouuu Oiouuu reopened this Sep 2, 2024
@Oiouuu Oiouuu closed this as completed Sep 2, 2024
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/meta-clang that referenced this issue Sep 9, 2024
Source: meta-clang
MR: 158188
Type: Integration
Disposition: Merged from meta-clang
ChangeID: 318e671
Description:

On aarch64 the handling of runtime exception is broken when build with clang.
There is currently a fix for libcxx on the layer but it is not enough and this
same fix needs to be applied globally.

First fix attempt just include libcxx:
kraj/meta-clang#963
kraj/meta-clang#968

Remaining reported issue:
kraj/meta-clang#998

Signed-off-by: Jose Quaresma <[email protected]>
(cherry picked from commit ee30860)
Signed-off-by: Jose Quaresma <[email protected]>
Signed-off-by: Jeremy A. Puhlman <[email protected]>
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

No branches or pull requests

3 participants