Skip to content

Commit 545904d

Browse files
committed
Use -Os when building aria2 and OpenSSL
1 parent 3949027 commit 545904d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ RUN curl -LO https://github.com/openssl/openssl/releases/download/openssl-3.6.0/
3737
curl -L https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz.sha256 | sha256sum --check
3838
RUN tar -xzf openssl-3.6.0.tar.gz
3939
WORKDIR /build-ssl/openssl-3.6.0
40-
RUN ./config --prefix=/openssl --openssldir=/dev/null no-shared no-apps no-autoload-config no-capieng no-dso no-dynamic-engine no-engine no-loadereng no-module
40+
RUN ./config --prefix=/openssl --openssldir=/dev/null no-shared no-apps no-autoload-config no-capieng no-dso no-dynamic-engine no-engine no-loadereng no-module -Os
4141
RUN make -j`nproc` && make install_sw && rm -rf /build-ssl
4242

4343
############
@@ -60,7 +60,8 @@ COPY aria2 /updater/aria2
6060
COPY .git/modules/aria2 /updater/.git/modules/aria2
6161
COPY build-aria.sh /updater/
6262
WORKDIR /updater/aria2
63-
RUN OPENSSL_LIBS='-L/openssl/lib64 -lssl -lcrypto -lpthread -ldl' OPENSSL_CFLAGS='-I /openssl/include' ../build-aria.sh --with-openssl
63+
RUN OPENSSL_LIBS='-L/openssl/lib64 -lssl -lcrypto -lpthread -ldl' OPENSSL_CFLAGS='-I /openssl/include' \
64+
CFLAGS=-Os CXXFLAGS=-Os ../build-aria.sh --with-openssl
6465

6566
#################
6667
# Build updater #

Dockerfile.win

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ COPY .git/modules/aria2 /updater/.git/modules/aria2
5151
COPY build-aria.sh /updater/
5252
WORKDIR /updater/aria2
5353
RUN git clean -dXff
54-
RUN ../build-aria.sh ARIA2_STATIC=yes --host i686-w64-mingw32
54+
RUN CFLAGS=-Os CXXFLAGS=-Os ../build-aria.sh ARIA2_STATIC=yes --host i686-w64-mingw32
5555

5656
#################
5757
# Build updater #

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ brew install autoconf automake libtool pkg-config gettext
7575
cd aria2
7676
# If building on M1, target x86 by running in Rosetta: arch -x86_64 ../build-aria.sh
7777
# (the --target option to configure doesn't seem to have any effect)
78-
../build-aria.sh
78+
CFLAGS=-Os CXXFLAGS=-Os ../build-aria.sh
7979
cd ..
8080
```
8181

0 commit comments

Comments
 (0)