Error building LibreOffice under Monterey M1

Hey guys, i’m trying to build LibreOffice on Android

autogen

--build=x86_64-unknown-linux-gnu
--with-android-ndk=/Users/hidden/Library/Android/sdk/ndk/18.1.5063045
--with-android-sdk=/Users/hidden/Library/Android/sdk
--with-distro=LibreOfficeAndroid
--enable-sal-log

Error i’m getting

configure: error: Your gcc/clang is not -fvisibility-inlines-hidden safe. This is no longer supported.
configure: error: Running the configure script for BUILD side failed, see CONF-FOR-BUILD/config.log
configure: error: setup/configure for BUILD side failed, see CONF-FOR-BUILD/config.log
Error running configure at /Users/hidden/StudioProjects/core/autogen.sh line 322.
make: *** [/Users/hidden/StudioProjects/core/config_host.mk] Error 1

gcc --version

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I’m curious, if someone ever tried to build for Android on macOS…

https://wiki.documentfoundation.org/Development/BuildingForAndroid :

We develop on Linux as the host environment.

Since your configuration is likely untested, we would be most grateful if you provide patches to enable it; but don’t expect someone to be able to tell you what to do. Indeed, you may get help regarding development on IRC and mailing list.