Skip to contentSkip to conversation

btrfs-tools, Makefile: remove duplicated '-o $@' option from CC cmdline for libbtrfsutil/ folder

PATCH New Ivan Efimov 1 participant 1 message Mar 3, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 btrfs-tools, Makefile: remove duplicated '-o $@' option from CC cmdline for libbtrfsutil/ folder

Command line for target "libbtrfsutil/%.o" contained double usage of '-o $@' option and causes compilation error:

cc1: error: too many filenames given

Upsteam-Status: Pending

---
 ...01-Makefile-fix-double-o-compiler-option-using.patch | 17 +++++++++++++++++
 meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.1.bb |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-fix-double-o-compiler-option-using.patch
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-Makefile-fix-double-o-compiler-option-using.patch new file +17 -0
new file mode 100644
index 0000000000..335067bc1f
@@ -0,0 +1,17 @@
+Command line for target "libbtrfsutil/%.o" contained double usage
+  of '-o $@' option and caused error:
+    cc1: error: too many filenames given
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -414,7 +414,7 @@ libbtrfs.so.0 libbtrfs.so: libbtrfs.so.0
+ 
+ libbtrfsutil/%.o: libbtrfsutil/%.c
+ 	@echo "    [CC]     $@"
+-	$(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) -o $@ -c $< -o $@
++	$(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) -c $< -o $@
+ 
+ libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects)
+ 	@echo "    [LD]     $@"
meta/recipes-devtools/btrfs-tools/btrfs-tools_4.20.1.bb +1 -0
index 1b4f515cb6..f1c4691313 100644
@@ -19,6 +19,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
            file://0001-Makefile-build-mktables-using-native-gcc.patch \
            file://0001-Add-LDFLAGS-when-building-libbtrfsutil.so.patch \
            file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
+           file://0001-Makefile-fix-double-o-compiler-option-using.patch \
            "
 
 inherit autotools-brokensep pkgconfig manpages distutils3-base
Signature · 1 line
2.14.1