Commit 57896891 authored by Rye's avatar Rye
Browse files

Fix linux build and package

parent 2a22994d
......@@ -83,32 +83,13 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
</map>
<key>manifest</key>
<array>
<string>lib/debug/libnghttp2.*</string>
<string>lib/release/libnghttp2.*</string>
<string>lib/debug/libnghttp2.so*</string>
<string>lib/release/libnghttp2.so*</string>
</array>
<key>name</key>
<string>linux</string>
</map>
<key>windows</key>
<map>
<key>configurations</key>
<map>
<key>default</key>
<map>
<key>default</key>
<boolean>true</boolean>
<key>name</key>
<string>default</string>
</map>
</map>
<key>manifest</key>
<array>
<string>lib/release/nghttp2.*</string>
</array>
<key>name</key>
<string>windows</string>
</map>
<key>windows64</key>
<map>
<key>configurations</key>
<map>
......@@ -126,7 +107,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>lib/release/nghttp2.*</string>
</array>
<key>name</key>
<string>windows64</string>
<string>windows</string>
</map>
</map>
<key>source_directory</key>
......
......@@ -142,7 +142,8 @@ pushd "$top/nghttp2"
# unset DISTCC_HOSTS CC CXX CFLAGS CPPFLAGS CXXFLAGS
# Default target per --address-size
opts="${TARGET_OPTS:--m$AUTOBUILD_ADDRSIZE $LL_BUILD_RELEASE}"
opts="${TARGET_OPTS:--m$AUTOBUILD_ADDRSIZE -fPIC -DPIC -g}"
hardening="-fstack-protector-strong -D_FORTIFY_SOURCE=2"
# Handle any deliberate platform targeting
if [ -z "${TARGET_CPPFLAGS:-}" ]; then
......@@ -153,14 +154,30 @@ pushd "$top/nghttp2"
export CPPFLAGS="$TARGET_CPPFLAGS"
fi
# Release configure and build
./configure --enable-lib-only CFLAGS="$opts" CXXFLAGS="$opts"
make
make check
mkdir -p "build_debug"
pushd "build_debug"
# Invoke cmake and use as official build
CFLAGS="$opts -Og" CXXFLAGS="$opts -Og" \
cmake -DCMAKE_BUILD_TYPE="Debug" ..
# ?! Unclear why this build tucks built libraries into a hidden
# .libs directory.
mv "$top/nghttp2/lib/.libs/libnghttp2.a" "$stage/lib/release/"
cmake --build . --config Debug --clean-first
mv lib/libnghttp2*.so* "$stage/lib/debug/"
popd
rm -rf "build_debug"
mkdir -p "build_release"
pushd "build_release"
# Invoke cmake and use as official build
CFLAGS="$opts $hardening" CXXFLAGS="$opts $hardening" \
cmake -DCMAKE_BUILD_TYPE="Release" ..
cmake --build . --config Release --clean-first
mv lib/libnghttp2*.so* "$stage/lib/release/"
cp -a lib/includes/nghttp2/nghttp2ver.h "$stage/include/nghttp2"
popd
rm -rf "build_release"
;;
esac
mkdir -p "$stage/LICENSES"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment