From 6caa6b4ad4369fdfeae95045baa23a908499e946 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <vital.had@gmail.com>
Date: Mon, 15 Apr 2024 22:49:35 +0800
Subject: [PATCH 09/13] Trash some breaking flags

---
 configure.ac                           | 2 +-
 modules/access/Makefile.am             | 4 ++--
 modules/gui/Makefile.am                | 2 +-
 modules/gui/macosx/Makefile.am         | 2 +-
 modules/keystore/Makefile.am           | 2 +-
 modules/services_discovery/Makefile.am | 2 +-
 test/Makefile.am                       | 1 -
 7 files changed, 7 insertions(+), 8 deletions(-)

diff --git configure.ac configure.ac
index e862ea5008..ba9f1176b7 100644
--- configure.ac
+++ configure.ac
@@ -168,7 +168,7 @@ case "${host_os}" in
     CXX="${CXX} -stdlib=libc++ -std=c++11"
     CXXFLAGS="${CXXFLAGS} -D_INTL_REDIRECT_MACROS ${ARCH_flag}"
     CPPFLAGS="${CPPFLAGS} ${ARCH_flag}"
-    OBJCFLAGS="${OBJCFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu11 ${ARCH_flag} -Werror=partial-availability"
+    OBJCFLAGS="${OBJCFLAGS} -D_INTL_REDIRECT_MACROS -std=gnu11 ${ARCH_flag}"
     LDFLAGS="${LDFLAGS} -Wl,-headerpad_max_install_names ${ARCH_flag}"
     VLC_ADD_LIBS([libvlc vlc],[-Wl,-undefined,dynamic_lookup,-framework,AppKit])
     VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation,-framework,CoreServices])
diff --git modules/access/Makefile.am modules/access/Makefile.am
index f295947233..fba475d7da 100644
--- modules/access/Makefile.am
+++ modules/access/Makefile.am
@@ -75,7 +75,7 @@ access_LTLIBRARIES += libpulsesrc_plugin.la
 endif
 
 libavaudiocapture_plugin_la_SOURCES = access/avaudiocapture.m
-libavaudiocapture_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc
+libavaudiocapture_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS)
 libavaudiocapture_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(accessdir)' -Wl,-framework,Foundation -Wl,-framework,AVFoundation -Wl,-framework,CoreMedia
 if HAVE_AVFOUNDATION
 access_LTLIBRARIES += libavaudiocapture_plugin.la
@@ -93,7 +93,7 @@ endif
 ### Video capture ###
 
 libavcapture_plugin_la_SOURCES = access/avcapture.m
-libavcapture_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc
+libavcapture_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS)
 libavcapture_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(accessdir)' -Wl,-framework,Foundation -Wl,-framework,AVFoundation -Wl,-framework,CoreMedia,  -Wl,-framework,CoreVideo
 if HAVE_AVFOUNDATION
 access_LTLIBRARIES += libavcapture_plugin.la
diff --git modules/gui/Makefile.am modules/gui/Makefile.am
index 99858ac60f..d4eff715b6 100644
--- modules/gui/Makefile.am
+++ modules/gui/Makefile.am
@@ -15,7 +15,7 @@ libminimal_macosx_plugin_la_SOURCES = \
 	gui/minimal_macosx/misc.h gui/minimal_macosx/misc.m \
 	gui/minimal_macosx/VLCMinimalVoutWindow.h gui/minimal_macosx/VLCMinimalVoutWindow.m \
 	gui/minimal_macosx/macosx.c
-libminimal_macosx_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc -fobjc-exceptions
+libminimal_macosx_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-exceptions
 libminimal_macosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' -Wl,-framework,Cocoa
 EXTRA_LTLIBRARIES += libminimal_macosx_plugin.la
 gui_LTLIBRARIES += $(LTLIBminimal_macosx)
diff --git modules/gui/macosx/Makefile.am modules/gui/macosx/Makefile.am
index 2dba2e162e..ae15a6f526 100644
--- modules/gui/macosx/Makefile.am
+++ modules/gui/macosx/Makefile.am
@@ -1,6 +1,6 @@
 SUFFIXES += .xib
 
-libmacosx_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-exceptions -fobjc-arc
+libmacosx_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-exceptions
 libmacosx_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(guidir)' \
 	-Wl,-framework,Cocoa -Wl,-framework,CoreServices \
 	-Wl,-framework,AVFoundation -Wl,-framework,CoreMedia -Wl,-framework,IOKit \
diff --git modules/keystore/Makefile.am modules/keystore/Makefile.am
index a1b414949e..b6630afcbe 100644
--- modules/keystore/Makefile.am
+++ modules/keystore/Makefile.am
@@ -27,7 +27,7 @@ libkwallet_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(keystoredir)'
 libkwallet_plugin_la_LIBADD = $(DBUS_LIBS) $(LIBM)
 
 libkeychain_plugin_la_SOURCES = keystore/keychain.m keystore/list_util.c keystore/list_util.h
-libkeychain_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc
+libkeychain_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS)
 libkeychain_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(keystoredir)' -Wl,-framework,Foundation -Wl,-framework,Security -Wl,-framework,Cocoa
 
 if HAVE_OSX
diff --git modules/services_discovery/Makefile.am modules/services_discovery/Makefile.am
index 216a43525b..ae80f9e5f4 100644
--- modules/services_discovery/Makefile.am
+++ modules/services_discovery/Makefile.am
@@ -83,7 +83,7 @@ sd_LTLIBRARIES += $(LTLIBmicrodns)
 EXTRA_LTLIBRARIES += libmicrodns_plugin.la
 
 libbonjour_plugin_la_SOURCES = services_discovery/bonjour.m
-libbonjour_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS) -fobjc-arc
+libbonjour_plugin_la_OBJCFLAGS = $(AM_OBJCFLAGS)
 libbonjour_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(sddir)' -Wl,-framework,Foundation
 if HAVE_OSX
 sd_LTLIBRARIES += libbonjour_plugin.la
diff --git test/Makefile.am test/Makefile.am
index c2b0d082c9..19276d0a73 100644
--- test/Makefile.am
+++ test/Makefile.am
@@ -254,7 +254,6 @@ endif
 vlccoreios_SOURCES = iosvlc.m
 vlccoreios_LDFLAGS = $(LDFLAGS_vlc) -Wl,-framework,Foundation,-framework,UIKit
 vlccoreios_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/Frameworks/"
-vlccoreios_OBJCFLAGS = -fobjc-arc
 vlccoreios_LDADD = ../lib/libvlc.la ../src/libvlccore.la
 if HAVE_DARWIN
 if !HAVE_OSX
