53b232b0f6
- btrfs-support-pie.patch: remove CFLAGS usage from linker lines, this will allow the default PIE support to work. OBS-URL: https://build.opensuse.org/request/show/502807 OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=263
105 lines
4.2 KiB
Diff
105 lines
4.2 KiB
Diff
Index: btrfs-progs-v4.10.2/Makefile
|
|
===================================================================
|
|
--- btrfs-progs-v4.10.2.orig/Makefile
|
|
+++ btrfs-progs-v4.10.2/Makefile
|
|
@@ -341,25 +341,25 @@ $(lib_links):
|
|
|
|
btrfs-%.static: btrfs-%.static.o $(static_objects) $(patsubst %.o,%.static.o,$(standalone_deps)) $(static_libbtrfs_objects)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(STATIC_CFLAGS) -o $@ $@.o $(static_objects) \
|
|
+ $(Q)$(CC) -o $@ $@.o $(static_objects) \
|
|
$(patsubst %.o, %.static.o, $($(subst -,_,$(subst .static,,$@)-objects))) \
|
|
$(static_libbtrfs_objects) $(STATIC_LDFLAGS) \
|
|
$($(subst -,_,$(subst .static,,$@)-libs)) $(STATIC_LIBS)
|
|
|
|
btrfs-%: btrfs-%.o $(objects) $(standalone_deps) $(libs_static)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(CFLAGS) -o $@ $(objects) $@.o \
|
|
+ $(Q)$(CC) -o $@ $(objects) $@.o \
|
|
$($(subst -,_,$@-objects)) \
|
|
$(libs_static) \
|
|
$(LDFLAGS) $(LIBS) $($(subst -,_,$@-libs))
|
|
|
|
btrfs: btrfs.o $(objects) $(cmds_objects) $(libs_static)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_COMP)
|
|
+ $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_COMP)
|
|
|
|
btrfs.static: btrfs.static.o $(static_objects) $(static_cmds_objects) $(static_libbtrfs_objects)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(STATIC_CFLAGS) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS) $(STATIC_LIBS_COMP)
|
|
+ $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS) $(STATIC_LIBS_COMP)
|
|
|
|
# For backward compatibility, 'btrfs' changes behaviour to fsck if it's named 'btrfsck'
|
|
btrfsck: btrfs
|
|
@@ -372,43 +372,43 @@ btrfsck.static: btrfs.static
|
|
|
|
mkfs.btrfs: $(mkfs_objects) $(objects) $(libs_static)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
|
|
+ $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
|
|
|
|
mkfs.btrfs.static: $(static_mkfs_objects) $(static_objects) $(static_libbtrfs_objects)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(STATIC_CFLAGS) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS)
|
|
+ $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS)
|
|
|
|
btrfstune: btrfstune.o $(objects) $(libs_static)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
|
|
+ $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
|
|
|
|
btrfstune.static: btrfstune.static.o $(static_objects) $(static_libbtrfs_objects)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(STATIC_CFLAGS) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS)
|
|
+ $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS)
|
|
|
|
btrfs-image: image/main.o $(objects) $(libs_static)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_COMP)
|
|
+ $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_COMP)
|
|
|
|
btrfs-image.static: image/main.static.o $(static_objects) $(static_libbtrfs_objects)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(STATIC_CFLAGS) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS) $(STATIC_LIBS_COMP)
|
|
+ $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(STATIC_LIBS) $(STATIC_LIBS_COMP)
|
|
|
|
btrfs-convert: $(convert_objects) $(objects) $(libs_static)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(btrfs_convert_libs) $(LIBS)
|
|
+ $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(btrfs_convert_libs) $(LIBS)
|
|
|
|
btrfs-convert.static: $(static_convert_objects) $(static_objects) $(static_libbtrfs_objects)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(STATIC_CFLAGS) -o $@ $^ $(STATIC_LDFLAGS) $(btrfs_convert_libs) $(STATIC_LIBS)
|
|
+ $(Q)$(CC) -o $@ $^ $(STATIC_LDFLAGS) $(btrfs_convert_libs) $(STATIC_LIBS)
|
|
|
|
dir-test: dir-test.o $(objects) $(libs)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
|
|
+ $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
|
|
|
|
quick-test: quick-test.o $(objects) $(libs)
|
|
@echo " [LD] $@"
|
|
- $(Q)$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
|
|
+ $(Q)$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
|
|
|
|
ioctl-test.o: ioctl-test.c ioctl.h kerncompat.h ctree.h
|
|
@echo " [CC] $@"
|
|
@@ -430,13 +430,13 @@ ioctl-test: ioctl-test.o
|
|
|
|
ioctl-test-32: ioctl-test-32.o
|
|
@echo " [LD32] $@"
|
|
- $(Q)$(CC) $(CFLAGS) -m32 -o $@ $< $(LDFLAGS)
|
|
+ $(Q)$(CC) -m32 -o $@ $< $(LDFLAGS)
|
|
@echo " ?[PAHOLE] $@.pahole"
|
|
-$(Q)pahole $@ > $@.pahole
|
|
|
|
ioctl-test-64: ioctl-test-64.o
|
|
@echo " [LD64] $@"
|
|
- $(Q)$(CC) $(CFLAGS) -m64 -o $@ $< $(LDFLAGS)
|
|
+ $(Q)$(CC) -m64 -o $@ $< $(LDFLAGS)
|
|
@echo " ?[PAHOLE] $@.pahole"
|
|
-$(Q)pahole $@ > $@.pahole
|
|
|