]> git.webhop.me Git - bs-cst-neutrino-hd.git/commitdiff
ofgwrite fix build with gcc10 fno common
authorMarkham <markham001@gmx.de>
Fri, 15 Apr 2022 20:10:14 +0000 (22:10 +0200)
committerMarkham <markham001@gmx.de>
Fri, 15 Apr 2022 20:10:14 +0000 (22:10 +0200)
archive-patches/ofgwrite-fix-build-with-gcc10-fno-common.patch [new file with mode: 0644]
make/applications.mk

diff --git a/archive-patches/ofgwrite-fix-build-with-gcc10-fno-common.patch b/archive-patches/ofgwrite-fix-build-with-gcc10-fno-common.patch
new file mode 100644 (file)
index 0000000..17f274a
--- /dev/null
@@ -0,0 +1,91 @@
+From 6bfb5dd9ab2f6e6cd45c208493844b5f65616976 Mon Sep 17 00:00:00 2001
+From: max_10 <max_10@gmx.de>
+Date: Sun, 6 Sep 2020 12:03:13 +0200
+Subject: - ofgwrite: fixed build with gcc 10 -fno-common
+
+
+diff --git a/ofgwrite.c b/ofgwrite.c
+index 1cd00f0..a944e2b 100644
+--- a/ofgwrite.c
++++ b/ofgwrite.c
+@@ -14,6 +14,29 @@
+ #include <unistd.h>
+ #include <errno.h>
++struct stat kernel_file_stat;
++struct stat rootfs_file_stat;
++
++char kernel_device_arg[1000];
++char rootfs_device_arg[1000];
++char kernel_device[1000];
++char rootfs_device[1000];
++char rootfs_sub_dir[1000];
++
++int found_kernel_device;
++int found_rootfs_device;
++int user_kernel;
++int user_rootfs;
++int rootsubdir_check;
++int multiboot_partition;
++char current_rootfs_device[1000];
++char current_kernel_device[1000];
++char current_rootfs_sub_dir[1000];
++char vumodel[63];
++
++enum FlashModeTypeEnum kernel_flash_mode;
++enum FlashModeTypeEnum rootfs_flash_mode;
++
+ const char ofgwrite_version[] = "4.5.0";
+ int flash_kernel  = 0;
+ int flash_rootfs  = 0;
+--- a/ofgwrite.h
++++ b/ofgwrite.h
+@@ -1,23 +1,23 @@
+ #include <sys/stat.h>
+-struct stat kernel_file_stat;
+-struct stat rootfs_file_stat;
++extern struct stat kernel_file_stat;
++extern struct stat rootfs_file_stat;
+-char kernel_device_arg[1000];
+-char rootfs_device_arg[1000];
+-char kernel_device[1000];
+-char rootfs_device[1000];
+-char rootfs_sub_dir[1000];
+-
+-int found_kernel_device;
+-int found_rootfs_device;
+-int user_kernel;
+-int user_rootfs;
+-int multiboot_partition;
+-char current_rootfs_device[1000];
+-char current_kernel_device[1000];
+-char current_rootfs_sub_dir[1000];
+-char vumodel[63];
++extern char kernel_device_arg[1000];
++extern char rootfs_device_arg[1000];
++extern char kernel_device[1000];
++extern char rootfs_device[1000];
++extern char rootfs_sub_dir[1000];
++
++extern int found_kernel_device;
++extern int found_rootfs_device;
++extern int user_kernel;
++extern int user_rootfs;
++extern int multiboot_partition;
++extern char current_rootfs_device[1000];
++extern char current_kernel_device[1000];
++extern char current_rootfs_sub_dir[1000];
++extern char vumodel[63];
+ void handle_busybox_fatal_error();
+@@ -31,5 +31,5 @@ enum FlashModeTypeEnum
+       FLASH_MODE_UNKNOWN, MTD, TARBZ2
+ };
+-enum FlashModeTypeEnum kernel_flash_mode;
+-enum FlashModeTypeEnum rootfs_flash_mode;
++extern enum FlashModeTypeEnum kernel_flash_mode;
++extern enum FlashModeTypeEnum rootfs_flash_mode;
index b778373bfcd61d2622e61a90bcacb75dd36b458f..22e9a961d1d6610abf54f2d7e59476f3adedfea0 100755 (executable)
@@ -806,6 +806,7 @@ $(D)/ofgwrite: $(ARCHIVE)/ofgwrite-git-$(OFGWRITE_VER).tar.bz2 | $(TARGETPREFIX)
                $(PATCH)/ofgwrite.patch; \
                $(PATCH)/ofgwrite-neutrino.patch; \
                $(PATCH)/ofgwrite-fix-build-with-glibc-2.25.patch; \
+               $(PATCH)/ofgwrite-fix-build-with-gcc10-fno-common.patch; \
                export CC=$(TARGET)-gcc && \
                export AR=$(TARGET)-ar && \
                $(BUILDENV); \