Advertisement
svenhoefer

Untitled

May 15th, 2017
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 12.29 KB | None | 0 0
  1. diff --git a/archive-patches/ct-ng-coolstream_hd1-new.config b/archive-patches/ct-ng-coolstream_hd1-new.config
  2. index 582cf10..7c2f9d5 100644
  3. --- a/archive-patches/ct-ng-coolstream_hd1-new.config
  4. +++ b/archive-patches/ct-ng-coolstream_hd1-new.config
  5. @@ -443,7 +443,7 @@ CT_LIBC_EGLIBC_V_2_13=y
  6.  CT_EGLIBC_REVISION="HEAD"
  7.  # CT_EGLIBC_HTTP is not set
  8.  # CT_EGLIBC_CHECKOUT is not set
  9. -# CT_EGLIBC_OPT_SIZE is not set
  10. +CT_EGLIBC_OPT_SIZE=y
  11.  # CT_EGLIBC_CUSTOM_CONFIG is not set
  12.  CT_LIBC_newlib_AVAILABLE=y
  13.  CT_LIBC_uClibc_AVAILABLE=y
  14. diff --git a/make/environment.mk b/make/environment.mk
  15. index 7b43002..bc7b701 100644
  16. --- a/make/environment.mk
  17. +++ b/make/environment.mk
  18. @@ -95,14 +95,15 @@ endif
  19.  STATICLIB             = $(STATIC_DIR)/lib
  20.  TARGETLIB             = $(TARGETPREFIX)/lib
  21.  TARGETINCLUDE         = $(TARGETPREFIX)/include
  22. -TARGET_CFLAGS         = -pipe -O2 -g -I$(TARGETINCLUDE)
  23. -TARGET_CFLAGS_SMALL   = -pipe -Os -g -I$(TARGETINCLUDE)
  24. +TARGET_OFLAG          = -O2
  25. +ifeq ($(BOXSERIES), hd1)
  26. +  TARGET_OFLAG        = -Os
  27. +endif
  28. +TARGET_CFLAGS         = -pipe $(TARGET_OFLAG) -g -I$(TARGETINCLUDE)
  29.  TARGET_CPPFLAGS       = $(TARGET_CFLAGS)
  30. -TARGET_CPPFLAGS_SMALL = $(TARGET_CFLAGS_SMALL)
  31.  TARGET_CXXFLAGS       = $(TARGET_CFLAGS)
  32. -TARGET_CXXFLAGS_SMALL = $(TARGET_CFLAGS_SMALL)
  33. -TARGET_LDFLAGS        = -Wl,-O1 -L$(TARGETLIB)
  34. -TARGET_LDFLAGS_RPATH  = -Wl,-O1 -L$(TARGETLIB) -Wl,-rpath-link,$(TARGETLIB)
  35. +TARGET_LDFLAGS        = -Wl,$(TARGET_OFLAG) -L$(TARGETLIB)
  36. +TARGET_LDFLAGS_RPATH  = -Wl,$(TARGET_OFLAG) -L$(TARGETLIB) -Wl,-rpath-link,$(TARGETLIB)
  37.  LD_FLAGS              = $(TARGET_LDFLAGS)
  38.  
  39.  VPATH = $(D)
  40. @@ -144,18 +145,6 @@ CONFIGURE = \
  41.     $(BUILDENV) \
  42.     ./configure $(CONFIGURE_OPTS)
  43.  
  44. -BUILDENV_SMALL = \
  45. -   CFLAGS="$(TARGET_CFLAGS_SMALL)" \
  46. -   CPPFLAGS="$(TARGET_CPPFLAGS_SMALL)" \
  47. -   CXXFLAGS="$(TARGET_CXXFLAGS_SMALL)" \
  48. -   LDFLAGS="$(TARGET_LDFLAGS)" \
  49. -   PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
  50. -
  51. -CONFIGURE_SMALL = \
  52. -   test -f ./configure || ./autogen.sh && \
  53. -   $(BUILDENV_SMALL) \
  54. -   ./configure $(CONFIGURE_OPTS)
  55. -
  56.  BUILDENV_RPATH = \
  57.     CFLAGS="$(TARGET_CFLAGS)" \
  58.     CPPFLAGS="$(TARGET_CPPFLAGS)" \
  59. diff --git a/make/neutrino.mk b/make/neutrino.mk
  60. index ce5ecfe..0f477d0 100644
  61. --- a/make/neutrino.mk
  62. +++ b/make/neutrino.mk
  63. @@ -18,11 +18,7 @@ endif
  64.  ifeq ($(DEBUG), yes)
  65.     N_CFLAGS += -ggdb3 -rdynamic
  66.  else
  67. -  ifeq ($(BOXSERIES), hd2)
  68. -   N_CFLAGS += -g -O2
  69. -  else
  70. -   N_CFLAGS += -g -Os
  71. -  endif
  72. +   N_CFLAGS += -g $(TARGET_OFLAG)
  73.  endif
  74.  
  75.  NEUTRINO_PKG_DEPS =
  76. @@ -33,7 +29,7 @@ N_LDFLAGS = -L$(TARGETLIB) -lcrypto -ldl -lz $(CORTEX-STRINGS)
  77.  ifeq ($(DEBUG), yes)
  78.     N_LDFLAGS += -Wl,-rpath-link,$(TARGETLIB)
  79.  else
  80. -   N_LDFLAGS += -Wl,-O2,-rpath-link,$(TARGETLIB)
  81. +   N_LDFLAGS += -Wl,$(TARGET_OFLAG),-rpath-link,$(TARGETLIB)
  82.  endif
  83.  
  84.  N_CONFIGURE_DEBUG =
  85. diff --git a/make/plugins-extra.mk b/make/plugins-extra.mk
  86. index 38011f9..7101047 100644
  87. --- a/make/plugins-extra.mk
  88. +++ b/make/plugins-extra.mk
  89. @@ -15,8 +15,8 @@ $(LIBPLUG)/links.so: $(D)/libpng $(LIBPLUG) $(VARCONF)
  90.         export SYSROOT=$(TARGETPREFIX) && \
  91.         export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) && \
  92.         export LD_LIBRARY_PATH=$(TARGETLIB) && \
  93. -       export CFLAGS="-pipe -Os -g -I$(TARGETINCLUDE)" && \
  94. -       export LIBS="$(CORTEX-STRINGS) -Wl,-O1 -L$(TARGETLIB)" && \
  95. +       export CFLAGS="-pipe $(TARGET_OFLAG) -g -I$(TARGETINCLUDE)" && \
  96. +       export LIBS="$(CORTEX-STRINGS) -Wl,$(TARGET_OFLAG) -L$(TARGETLIB)" && \
  97.         ./configure \
  98.             --host=$(TARGET) \
  99.             --build=$(BUILD) \
  100. diff --git a/make/system-libs.mk b/make/system-libs.mk
  101. index 83a9d13..fa2fb6a 100644
  102. --- a/make/system-libs.mk
  103. +++ b/make/system-libs.mk
  104. @@ -402,7 +402,7 @@ $(D)/openthreads: $(SOURCE_DIR)/$(REPO_OPENTHREADS) | $(TARGETPREFIX)
  105.         cmake . -DCMAKE_BUILD_TYPE="None" \
  106.             -DCMAKE_SYSTEM_NAME="Linux" \
  107.             -DCMAKE_SYSTEM_PROCESSOR="arm" \
  108. -           -DCMAKE_CXX_FLAGS="-O2 -DNDEBUG $(OPENTHREADS_CONFIGURE)" \
  109. +           -DCMAKE_CXX_FLAGS="$(TARGET_OFLAG) -DNDEBUG $(OPENTHREADS_CONFIGURE)" \
  110.             -DCMAKE_INSTALL_PREFIX="" \
  111.             -DCMAKE_C_COMPILER="$(TARGET)-gcc" \
  112.             -DCMAKE_CXX_COMPILER="$(TARGET)-g++" \
  113. diff --git a/make/system-tools-extra.mk b/make/system-tools-extra.mk
  114. index c9a9379..742c4af 100644
  115. --- a/make/system-tools-extra.mk
  116. +++ b/make/system-tools-extra.mk
  117. @@ -3,7 +3,7 @@
  118.  $(D)/binutils: $(ARCHIVE)/binutils-$(BINUTILS_VER).tar.bz2 | $(TARGETPREFIX)
  119.     $(UNTAR)/binutils-$(BINUTILS_VER).tar.bz2
  120.     cd $(BUILD_TMP)/binutils-$(BINUTILS_VER) && \
  121. -       $(CONFIGURE_SMALL) --target=$(TARGET) \
  122. +       $(CONFIGURE) --target=$(TARGET) \
  123.             --prefix= \
  124.             --disable-multilib \
  125.             --disable-werror \
  126. diff --git a/make/system-tools.mk b/make/system-tools.mk
  127. index 4a86083..a4d003d 100644
  128. --- a/make/system-tools.mk
  129. +++ b/make/system-tools.mk
  130. @@ -5,7 +5,7 @@ openvpn: openvpn-$(BOXSERIES)
  131.  $(D)/openvpn-hd2: $(D)/lzo $(D)/openssl $(ARCHIVE)/openvpn-$(OPENVPN_VER).tar.xz | $(TARGETPREFIX)
  132.     $(UNTAR)/openvpn-$(OPENVPN_VER).tar.xz
  133.     cd $(BUILD_TMP)/openvpn-$(OPENVPN_VER) && \
  134. -   $(BUILDENV_SMALL) ./configure \
  135. +   $(BUILDENV) ./configure \
  136.         --build=$(BUILD) \
  137.         --host=$(TARGET) \
  138.         --prefix= \
  139. @@ -33,7 +33,7 @@ $(D)/openssh: $(D)/openssl $(D)/zlib $(ARCHIVE)/openssh-$(OPENSSH_VER).tar.gz |
  140.     $(UNTAR)/openssh-$(OPENSSH_VER).tar.gz
  141.     cd $(BUILD_TMP)/openssh-$(OPENSSH_VER) && \
  142.     export ac_cv_search_dlopen=no && \
  143. -   $(BUILDENV_SMALL) ./configure \
  144. +   $(BUILDENV) ./configure \
  145.         --build=$(BUILD) \
  146.         --host=$(TARGET) \
  147.         --prefix= \
  148. @@ -172,7 +172,7 @@ $(D)/coreutils: $(ARCHIVE)/coreutils-$(COREUTILS_VER).tar.xz | $(TARGETPREFIX)
  149.     cd $(BUILD_TMP)/coreutils-$(COREUTILS_VER) && \
  150.         $(PATCH)/coreutils-fix-coolstream-build.patch && \
  151.         autoreconf -fi && \
  152. -       $(CONFIGURE_SMALL) --target=$(TARGET) \
  153. +       $(CONFIGURE) --target=$(TARGET) \
  154.             --prefix= \
  155.             --enable-silent-rules \
  156.             --disable-xattr \
  157. @@ -260,7 +260,7 @@ $(D)/smartmontools: $(ARCHIVE)/smartmontools-$(SMARTMON_VER).tar.gz | $(TARGETPR
  158.     $(UNTAR)/smartmontools-$(SMARTMON_VER).tar.gz
  159.     cd $(BUILD_TMP)/smartmontools-$(SMARTMON_VER) && \
  160.         $(BUILDENV) \
  161. -       $(CONFIGURE_SMALL) --target=$(TARGET) --prefix= && \
  162. +       $(CONFIGURE) --target=$(TARGET) --prefix= && \
  163.         $(MAKE) && \
  164.         install -m755 smartctl $(TARGETPREFIX)/sbin/smartctl
  165.     $(REMOVE)/smartmontools-$(SMARTMON_VER)
  166. @@ -295,7 +295,7 @@ $(D)/vsftpd: $(ARCHIVE)/vsftpd-3.0.3.tar.gz | $(TARGETPREFIX)
  167.         $(PATCH)/vsftpd.diff && \
  168.         $(PATCH)/vsftpd-ssl.diff && \
  169.         make clean && \
  170. -       TARGETPREFIX=$(TARGETPREFIX) make CC=$(TARGET)-gcc LIBS="-lcrypt -lcrypto -lssl" CFLAGS="-pipe -O2 -g -I$(TARGETINCLUDE)" LDFLAGS="$(TARGET_LDFLAGS_RPATH)"
  171. +       TARGETPREFIX=$(TARGETPREFIX) make CC=$(TARGET)-gcc LIBS="-lcrypt -lcrypto -lssl" CFLAGS="-pipe $(TARGET_OFLAG) -g -I$(TARGETINCLUDE)" LDFLAGS="$(TARGET_LDFLAGS_RPATH)"
  172.     install -d $(TARGETPREFIX)/share/empty
  173.     install -D -m 755 $(BUILD_TMP)/vsftpd-3.0.3/vsftpd $(TARGETPREFIX)/sbin/vsftpd
  174.     install -D -m 644 $(SCRIPTS)/vsftpd.conf $(TARGETPREFIX)/etc/vsftpd.conf
  175. @@ -336,7 +336,7 @@ $(D)/minicom: $(D)/libncurses $(ARCHIVE)/minicom-$(MINICOM_VER).tar.gz | $(TARGE
  176.     $(UNTAR)/minicom-$(MINICOM_VER).tar.gz
  177.     cd $(BUILD_TMP)/minicom-$(MINICOM_VER) && \
  178.         $(PATCH)/minicom-fix-h-v-return-value-is-not-0.patch && \
  179. -       $(CONFIGURE_SMALL) \
  180. +       $(CONFIGURE) \
  181.             --prefix= \
  182.             --target=$(TARGET) \
  183.             --disable-nls && \
  184. @@ -388,7 +388,7 @@ $(D)/bash: $(ARCHIVE)/bash-$(BASH_VER).tar.gz | $(TARGETPREFIX)
  185.         for patch in $(PATCHES)/bash-$(BASH_MAJOR).$(BASH_MINOR)/*; do \
  186.             patch -p0 -i $$patch; \
  187.         done; \
  188. -       $(CONFIGURE_SMALL) && \
  189. +       $(CONFIGURE) && \
  190.         $(MAKE) && \
  191.         install -m 755 bash $(TARGETPREFIX)/bin
  192.     $(REMOVE)/bash-$(BASH_VER)
  193. @@ -398,7 +398,7 @@ $(D)/e2fsprogs: $(ARCHIVE)/e2fsprogs-$(E2FSPROGS_VER).tar.gz | $(TARGETPREFIX)
  194.     $(UNTAR)/e2fsprogs-$(E2FSPROGS_VER).tar.gz
  195.     cd $(BUILD_TMP)/e2fsprogs-$(E2FSPROGS_VER) && \
  196.         autoreconf -fi && \
  197. -       $(CONFIGURE_SMALL) \
  198. +       $(CONFIGURE) \
  199.             --target=$(TARGET) \
  200.             --prefix=/ \
  201.             --infodir=/.remove \
  202. @@ -431,7 +431,7 @@ $(D)/e2fsprogs: $(ARCHIVE)/e2fsprogs-$(E2FSPROGS_VER).tar.gz | $(TARGETPREFIX)
  203.  $(D)/ntfs-3g: $(ARCHIVE)/ntfs-3g_ntfsprogs-$(NTFS3G_VER).tgz | $(TARGETPREFIX)
  204.     $(UNTAR)/ntfs-3g_ntfsprogs-$(NTFS3G_VER).tgz
  205.     cd $(BUILD_TMP)/ntfs-3g_ntfsprogs-$(NTFS3G_VER) && \
  206. -       CFLAGS="-pipe -Os -g" ./configure \
  207. +       CFLAGS="-pipe $(TARGET_OFLAG) -g" ./configure \
  208.             --build=$(BUILD) \
  209.             --host=$(TARGET) \
  210.             --prefix= \
  211. @@ -496,7 +496,7 @@ $(D)/samba-hd1: $(ARCHIVE)/samba-2.2.12.tar.gz | $(TARGETPREFIX)
  212.             $(TARGETLIB)/codepages/unicode_map.ISO8859-15
  213.     $(MAKE) -C $(BUILD_TMP)/samba-2.2.12/source distclean
  214.     cd $(BUILD_TMP)/samba-2.2.12/source && \
  215. -       $(BUILDENV_SMALL) \
  216. +       $(BUILDENV) \
  217.         ./configure \
  218.             --build=$(BUILD) \
  219.             --host=$(TARGET) \
  220. @@ -537,7 +537,7 @@ $(D)/samba-hd2: $(ARCHIVE)/samba-3.3.9.tar.gz $(D)/libiconv | $(TARGETPREFIX)
  221.         cd source && \
  222.         export CONFIG_SITE=$(PATCHES)/samba-3.3.9-config.site && \
  223.         ./autogen.sh && \
  224. -       $(CONFIGURE_SMALL) \
  225. +       $(CONFIGURE) \
  226.             --build=$(BUILD) \
  227.             --host=$(TARGET) \
  228.             --target=$(TARGET) \
  229. @@ -590,7 +590,7 @@ $(D)/dropbear: $(D)/zlib $(ARCHIVE)/dropbear-$(DROPBEAR_VER).tar.bz2 | $(TARGETP
  230.  $(D)/sg3-utils: $(ARCHIVE)/sg3_utils-$(SG3-UTILS_VER).tar.xz | $(TARGETPREFIX)
  231.     $(UNTAR)/sg3_utils-$(SG3-UTILS_VER).tar.xz
  232.     cd $(BUILD_TMP)/sg3_utils-$(SG3-UTILS_VER) && \
  233. -       $(CONFIGURE_SMALL) --prefix= --mandir=/.remove && \
  234. +       $(CONFIGURE) --prefix= --mandir=/.remove && \
  235.         $(MAKE) && \
  236.         cp -a src/.libs/sg_start $(TARGETPREFIX)/bin && \
  237.         cp -a lib/.libs/libsgutils2.so.2.0.0 $(TARGETLIB) && \
  238. @@ -636,7 +636,7 @@ $(D)/wpa_supplicant: $(D)/openssl $(ARCHIVE)/wpa_supplicant-0.7.3.tar.gz | $(TAR
  239.     $(UNTAR)/wpa_supplicant-0.7.3.tar.gz
  240.     pushd $(BUILD_TMP)/wpa_supplicant-0.7.3/wpa_supplicant && \
  241.         cp $(PATCHES)/wpa_supplicant_config .config && \
  242. -       CC=$(TARGET)-gcc CFLAGS="$(TARGET_CFLAGS_SMALL)" CXXFLAGS="$(TARGET_CXXFLAGS_SMALL)" LDFLAGS="$(TARGET_LDFLAGS)" \
  243. +       CC=$(TARGET)-gcc CFLAGS="$(TARGET_CFLAGS)" CXXFLAGS="$(TARGET_CXXFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" \
  244.         $(MAKE)
  245.     cp -f $(BUILD_TMP)/wpa_supplicant-0.7.3/wpa_supplicant/wpa_cli $(TARGETPREFIX)/sbin/wpa_cli
  246.     cp -f $(BUILD_TMP)/wpa_supplicant-0.7.3/wpa_supplicant/wpa_passphrase $(TARGETPREFIX)/sbin/wpa_passphrase
  247. @@ -715,7 +715,7 @@ $(D)/bc: $(ARCHIVE)/bc-1.06.tar.gz | $(TARGETPREFIX)
  248.     $(UNTAR)/bc-1.06.tar.gz
  249.     cd $(BUILD_TMP)/bc-1.06 && \
  250.         autoreconf -fi && \
  251. -       $(CONFIGURE_SMALL) \
  252. +       $(CONFIGURE) \
  253.             --target=$(TARGET) \
  254.             --prefix= \
  255.             --mandir=/.remove \
  256. @@ -731,7 +731,7 @@ $(D)/usbutils: $(D)/libusb_compat $(ARCHIVE)/usbutils-007.tar.xz | $(TARGETPREFI
  257.     cd $(BUILD_TMP)//usbutils-007 && \
  258.     $(PATCH)/usbutils-avoid-dependency-on-bash.patch && \
  259.     $(PATCH)/usbutils-fix-null-pointer-crash.patch && \
  260. -       $(CONFIGURE_SMALL) \
  261. +       $(CONFIGURE) \
  262.             --target=$(TARGET) \
  263.             --prefix= \
  264.             --mandir=/.remove \
  265. @@ -746,7 +746,7 @@ $(D)/usbutils: $(D)/libusb_compat $(ARCHIVE)/usbutils-007.tar.xz | $(TARGETPREFI
  266.     $(REMOVE)/usbutils-007
  267.     touch $@
  268.  
  269. -DOSFSTOOLS_CFLAGS = $(TARGET_CFLAGS_SMALL) -D_GNU_SOURCE -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
  270. +DOSFSTOOLS_CFLAGS = $(TARGET_CFLAGS) -D_GNU_SOURCE -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
  271.  DOSFSTOOLS_DEPS =
  272.  DOSFSTOOLS_LDFLAGS = $(TARGET_LDFLAGS)
  273.  ifeq ($(BOXSERIES), hd2)
  274. @@ -758,7 +758,7 @@ $(D)/dosfstools: $(DOSFSTOOLS_DEPS) $(ARCHIVE)/dosfstools-$(DOSFSTOOLS_VER).tar.
  275.     $(UNTAR)/dosfstools-$(DOSFSTOOLS_VER).tar.xz
  276.     set -e; cd $(BUILD_TMP)/dosfstools-$(DOSFSTOOLS_VER); \
  277.         autoreconf -fi; \
  278. -       $(CONFIGURE_SMALL) \
  279. +       $(CONFIGURE) \
  280.             --prefix= \
  281.             --mandir=/.remove \
  282.             --docdir=/.remove \
  283. @@ -842,7 +842,7 @@ $(D)/wget: $(D)/libiconv $(D)/openssl $(ARCHIVE)/wget-$(WGET_VER).tar.gz | $(TAR
  284.     $(PATCH)/wget-$(WGET_VER)-remove-hardcoded-engine-support-for-openss.patch && \
  285.     $(PATCH)/wget-$(WGET_VER)-set-check_cert-false-by-default.patch && \
  286.     $(PATCH)/wget-$(WGET_VER)-change_DEFAULT_LOGFILE.patch && \
  287. -       $(CONFIGURE_SMALL) \
  288. +       $(CONFIGURE) \
  289.             --target=$(TARGET) \
  290.             --prefix= \
  291.             --datarootdir=/.remove \
  292. @@ -901,7 +901,7 @@ $(D)/exfat-utils: $(ARCHIVE)/exfat-utils-$(EXFAT_UTILS_VER).tar.gz $(D)/fuse-exf
  293.     $(UNTAR)/exfat-utils-$(EXFAT_UTILS_VER).tar.gz
  294.     pushd $(BUILD_TMP)/exfat-utils-$(EXFAT_UTILS_VER); \
  295.         autoreconf -fi; \
  296. -       $(CONFIGURE_SMALL) \
  297. +       $(CONFIGURE) \
  298.             --prefix= \
  299.             --docdir=/.remove \
  300.             --mandir=/.remove \
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement