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

Gentoo patches #16

Merged
merged 2 commits into from Apr 30, 2023
Merged

Gentoo patches #16

merged 2 commits into from Apr 30, 2023

Conversation

SoapGentoo
Copy link
Contributor

Hi @glx22
I am trying to upstream two patches from Gentoo so we can cut a fresh tarball for our users. I hope you can merge both commits!

@SoapGentoo
Copy link
Contributor Author

@glx22 ping

* This causes issues on musl, and generally doesn't make the
  code any simpler, while also creating lots of opportunities
  for undefined behavior.

Bug: https://bugs.gentoo.org/715910
* When compiling with `-flto`, ODR violations pop up:

  src/escapes.h:98:1: error: type 'struct esc' violates the C++ One Definition Rule [-Werror=odr]
     98 | START_ESCAPES()
        | ^
  src/escapes.h:98:1: note: a different type is defined in another translation unit
     98 | START_ESCAPES()
        | ^
  src/escapes.h:98:1: note: the first difference of corresponding definitions is field 'additional'
     98 | START_ESCAPES()
        | ^
  src/escapes.h:98:1: note: a type with different number of fields is defined in another translation unit
     98 | START_ESCAPES()
        | ^

  by wrapping the `struct esc` definitions in unnamed namespaces, we can avoid running afoul of ODR.

Bug: https://bugs.gentoo.org/859310
@SoapGentoo
Copy link
Contributor Author

@glx22 ping

1 similar comment
@SoapGentoo
Copy link
Contributor Author

@glx22 ping

@glx22 glx22 merged commit 635a97e into OpenTTD:master Apr 30, 2023
@SoapGentoo
Copy link
Contributor Author

@glx22 thanks, would it be possible to get a fresh version cut?

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