--- a/config/ltmain.sh	2019-06-13 14:57:30.333358936 +0200
+++ b/config/ltmain.sh.new	2019-06-13 14:56:02.639520965 +0200
@@ -3310,6 +3310,12 @@
 	continue
 	;;
 
+      skip )
+        lastarg=
+        arg_mode=normal
+        continue
+        ;;
+
       normal )
 	# Accept any command-line options.
 	case $arg in
@@ -3335,6 +3341,11 @@
 	  continue
 	  ;;
 
+	-Xlinker | -XCClinker)
+	  arg_mode=skip #  the next one is ignored for compile mode
+	  continue
+	  ;;
+
 	-Xcompiler)
 	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
 	  continue      #  The current "srcfile" will either be retained or
