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

macOS don't support -Wl,--start-group/--end-group #3570

Closed
wants to merge 2 commits into from

Conversation

rhapsodyv
Copy link

Using Native platform in macOS fails to compile because the flags -Wl,--start-group/-Wl,--end-group aren't supported in macOS.
The native platform build script can't fix it because the core is adding this flags.

This changes fix that: macOS don't support -Wl,--start-group/-Wl,--end-group flags.

macOS don't support -Wl,--start-group/-Wl,--end-group flags
@CLAassistant
Copy link

CLAassistant commented Jun 20, 2020

CLA assistant check
All committers have signed the CLA.

@ivankravets
Copy link
Member

I don't have an issue with using native dev-platform on my macOS. We also have tests for this case. Coud you provide a simple project to reproduce this issue?

@rhapsodyv
Copy link
Author

I tried this project and got this message:

https://github.com/lvgl/lv_platformio

Linking .pio/build/native/program
ld: unknown option: --start-group
collect2: error: ld returned 1 exit status
*** [.pio/build/native/program] Error 1
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin18/9.3.0/lto-wrapper
Target: x86_64-apple-darwin18
Configured with: /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_gcc9/gcc9/work/gcc-9.3.0/configure --prefix=/opt/local --build=x86_64-apple-darwin18 --enable-languages=c,c++,objc,obj-c++,lto,fortran --libdir=/opt/local/lib/gcc9 --includedir=/opt/local/include/gcc9 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-9 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-9 --with-gxx-include-dir=/opt/local/include/gcc9/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --disable-tls --with-pkgversion='MacPorts gcc9 9.3.0_1' --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 9.3.0 (MacPorts gcc9 9.3.0_1)

Maybe we are using different gcc versions?

@rhapsodyv
Copy link
Author

Confirmed that GCC 10 have the same problem with --start-group too

@ivankravets ivankravets added this to the 4.4.0 milestone Aug 1, 2020
@nomis
Copy link
Contributor

nomis commented Sep 16, 2020

This change broke the fix for #3282. I've created #3674.

@rhapsodyv
Copy link
Author

This change broke the fix for #3282. I've created #3674.

My original fix remove -Wl,--start-group/-Wl,--end-group only from Mac, where it isn't supported.

@ivankravets ivankravets modified the milestones: 5.0.0, 5.0.2 Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants