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

Refresh Makefile.FreeBSD to current versions #661

Closed
wants to merge 1 commit into from
Closed

Refresh Makefile.FreeBSD to current versions #661

wants to merge 1 commit into from

Conversation

diizzyy
Copy link

@diizzyy diizzyy commented Jul 3, 2021

Change default compilter to clang (cc)
Append CFLAGS and LDFLAGS instead of hardcoding
Remove hardcoded optimization and no-strict-aliasing
Fix typo

Signed-off-by: Daniel Engberg daniel.engberg.lists@pyret.net

Change default compilter to clang (cc)
Append CFLAGS and LDFLAGS instead of hardcoding
Remove hardcoded optimization and no-strict-aliasing
Fix typo

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
@z3APA3A
Copy link
Collaborator

z3APA3A commented Jul 9, 2021

-fno-strict-aliasing is required, it disables strict aliasing optimization. Current code is not compatible with strict aliasing, and at least gcc in latest versions enables strict aliasing by default and has known problems with aliasing detection, it leads to 3proxy crashes if compiled with some gcc versions without this flag

@diizzyy
Copy link
Author

diizzyy commented Jul 10, 2021

Thanks for the review and useful information!
How do you want to proceed? Tier 1 on 12.X uses clang, on 13.X the only exception is MIPS which isn't built by default. Add a comment if people want to use GCC? FreeBSD 11 is near end of life (Sept 30 2021) which a few more platforms still uses GCC on.

@z3APA3A
Copy link
Collaborator

z3APA3A commented Jul 12, 2021

clang supports -fno-strict-aliasing either. And AFAIK it's really required here, without -fno-strict-aliasing result can be unpredictable, see e.g. https://stackoverflow.com/questions/55264205/clang-strict-aliasing-optimizations-vs-unreachable-code-violating-strict-aliasin

@diizzyy
Copy link
Author

diizzyy commented Jul 12, 2021

I see, I'm asking because that port hasn't used in almost a year now
freebsd/freebsd-ports@4db96ef#diff-d0ae2cb73f773c40c87b7d3749bf0efa9732299458bf933d6ea247e43ef86ac1

@z3APA3A
Copy link
Collaborator

z3APA3A commented Oct 29, 2021

I have applied some of proposed changes, see 34c4162

@z3APA3A z3APA3A closed this Oct 29, 2021
@diizzyy
Copy link
Author

diizzyy commented Oct 29, 2021

Thanks!

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

2 participants