Skip to content

make: fix compiler detection - #34

Closed
lumag wants to merge 4 commits into
linux-msm:masterfrom
lumag:compiler
Closed

lumag wants to merge 4 commits into
linux-msm:masterfrom
lumag:compiler

Conversation

@lumag

@lumag lumag commented Sep 28, 2023

Copy link
Copy Markdown
Contributor

Use findstring to determine if gcc or clang is getting used.

Dmitry Baryshkov added 4 commits September 29, 2023 11:05
Use findstring to determine if gcc or clang is getting used.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
On ARM the conmux.c around gethostbyname() results in a compiler
warning/error:

conmux.c:269:27: error: cast increases required alignment of target type [-Werror=cast-align]
  269 |         saddr.sin_addr = *(struct in_addr *)hent->h_addr_list[0];

Instead of trying to fix the (deprecated) gethostbyname() call, switch
conmux to use getaddrinfo(), which is the proper way to resolve
addresses.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Ubuntu Xenial has very old gcc (5.4.0), which doesn't support
significant amount of flags used by our Makefile. Rather than detecting
the vesion, circumvent compiler detection by passing cc instead of gcc.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
@superna9999

Copy link
Copy Markdown
Member

IMHO Last commit is quite wrong... but using Meson won't help because the meson version 0.29.0 doesn't even support get_supported_arguments()...

@lumag

lumag commented Oct 2, 2023

Copy link
Copy Markdown
Contributor Author

@superna9999 Yep. I definitely didn't want to bring up $(call cc-option) from Kbuild. So it was just a simpler thing. Another option would be to move all compiler args to CI setup, leaving just -Wall -Werror by default.

@lumag

lumag commented Oct 2, 2023

Copy link
Copy Markdown
Contributor Author

Releveant part was picked into #14. Closing now.

@lumag lumag closed this Oct 2, 2023
@lumag
lumag deleted the compiler branch October 2, 2023 14:21
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.

2 participants