--- etc/fpc.cfg	2019-06-14 15:54:16.000000000 +0200
+++ fpc.cfg-new	2019-08-17 10:54:57.000000000 +0200
@@ -152,6 +152,14 @@
 -Fu/opt/local/libexec/fpc/lib/fpc/$fpcversion/units/$fpctarget/$fpcsubarch-$fpcmemorymodel
 -Fu/opt/local/libexec/fpc/lib/fpc/$fpcversion/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/*
 -Fu/opt/local/libexec/fpc/lib/fpc/$fpcversion/units/$fpctarget/$fpcsubarch-$fpcmemorymodel/rtl
+#endif
+
+# Search for $fpctarget/$fpcsubarch/ subdirectory first
+# for avr CPU
+#ifdef cpuavr
+-Fu/opt/local/libexec/fpc/lib/fpc/$fpcversion/units/$fpctarget/$fpcsubarch
+-Fu/opt/local/libexec/fpc/lib/fpc/$fpcversion/units/$fpctarget/$fpcsubarch/*
+-Fu/opt/local/libexec/fpc/lib/fpc/$fpcversion/units/$fpctarget/$fpcsubarch/rtl
 #endif
 
 # searchpath for units and other system dependent things
@@ -175,6 +175,11 @@
 # searchpath for tools
 -FD/opt/local/libexec/fpc/lib/fpc/$fpcversion/bin/$FPCTARGET
 
+# searchpath for qt4pas framework
+#IFDEF Darwin
+-FfPREFIX/libexec/qt4/lib
+#ENDIF
+
 # path to the gcclib
 #ifdef cpui386
 -Fl/Library/Developer/CommandLineTools/usr/lib/clang/14.0.3/lib/darwin
@@ -267,6 +267,12 @@
 -XX
 #endif
 
+# Explicitly set minimum version of OS X
+# Avoids harmless but annoying ld warning
+# Patch in sync with fpc and macOS
+#ifdef darwin
+-WM10.9
+#endif
 
 # -------------
 # Miscellaneous
