Unverified Commit 8fd3d1dc authored by boklm's avatar boklm
Browse files

Bug 25862: move mingw helper scripts to firefox

Stop using mingw helper scripts everywhere except for the firefox build.

At the same time as we move them to firefox, we simplify the helper
scripts by using var/CFLAGS and var/LDFLAGS from rbm.conf instead of
redefining the flags.

We are also now building firefox with -fstack-protector-strong instead
of -fstack-protector.
parent e7f9f6f1
......@@ -17,6 +17,29 @@
distdir=/var/tmp/dist/[% project %]
mkdir -p /var/tmp/build
[% IF c("var/windows") -%]
mingwdir=/var/tmp/dist/mingw-w64
mkdir -p $mingwdir/helpers
cat > $mingwdir/helpers/[% c("arch") %]-w64-mingw32-g++ << 'EOF'
#!/bin/sh
/var/tmp/dist/mingw-w64/bin/[% c("arch") %]-w64-mingw32-g++ [% c("var/LDFLAGS") %] [% c("var/CFLAGS") %] "$@"
EOF
cat > $mingwdir/helpers/[% c("arch") %]-w64-mingw32-gcc << 'EOF'
#!/bin/sh
/var/tmp/dist/mingw-w64/bin/[% c("arch") %]-w64-mingw32-gcc [% c("var/LDFLAGS") %] [% c("var/CFLAGS") %] "$@"
EOF
cat > $mingwdir/helpers/[% c("arch") %]-w64-mingw32-ld << 'EOF'
#!/bin/sh
/var/tmp/dist/mingw-w64/bin/[% c("arch") %]-w64-mingw32-ld [% c("var/LDFLAGS") %] "$@"
EOF
chmod +x $mingwdir/helpers/*
export PATH="$mingwdir/helpers:$PATH"
[% END -%]
[% IF c("var/linux") %]
mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/binutils') %]
......
......@@ -55,25 +55,6 @@ mkdir -p $distdir/gcclibs
cp [% c("arch") %]-w64-mingw32/libssp/.libs/libssp-0.dll $distdir/gcclibs
cp [% c("arch") %]-w64-mingw32/libgcc/shlib/[% c("var/libgcc_dll") %] $distdir/gcclibs
mkdir -p $distdir/helpers
cat > $distdir/helpers/[% c("arch") %]-w64-mingw32-g++ << 'EOF'
#!/bin/sh
/var/tmp/dist/mingw-w64/bin/[% c("arch") %]-w64-mingw32-g++ -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -fstack-protector --param ssp-buffer-size=4 -fno-strict-overflow "$@"
EOF
cat > $distdir/helpers/[% c("arch") %]-w64-mingw32-gcc << 'EOF'
#!/bin/sh
/var/tmp/dist/mingw-w64/bin/[% c("arch") %]-w64-mingw32-gcc -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -fstack-protector --param ssp-buffer-size=4 -fno-strict-overflow "$@"
EOF
cat > $distdir/helpers/[% c("arch") %]-w64-mingw32-ld << 'EOF'
#!/bin/sh
/var/tmp/dist/mingw-w64/bin/[% c("arch") %]-w64-mingw32-ld --dynamicbase --nxcompat --enable-reloc-section -lssp -L$gcclibs "$@"
EOF
chmod +x $distdir/helpers/*
cd /var/tmp/dist
[% c('tar', {
tar_src => [ project ],
......
......@@ -15,7 +15,7 @@ var:
[% c("var/setarch") -%]
mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
export PATH="/var/tmp/dist/mingw-w64/helpers:/var/tmp/dist/mingw-w64/bin:$PATH"
export PATH="/var/tmp/dist/mingw-w64/bin:$PATH"
export gcclibs=/var/tmp/dist/mingw-w64/gcclibs
targets:
windows-i686:
......
#!/bin/bash
[% c("var/set_default_env") -%]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
# remove hardening wrappers
rm -Rf /var/tmp/dist/mingw-w64/helpers
mkdir -p /var/tmp/dist
mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf nsis-[% c('version') %].tar.bz2
......
......@@ -216,7 +216,7 @@ targets:
container:
suite: jessie
configure_opt: '--host=[% c("arch") %]-w64-mingw32 CFLAGS="[% c("var/CFLAGS") %]" LDFLAGS="[% c("var/LDFLAGS") %]"'
CFLAGS: '[% c("var/flag_mwindows") %] -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security'
CFLAGS: '[% c("var/flag_mwindows") %] -fstack-protector-strong -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security'
LDFLAGS: '[% c("var/flag_mwindows") %] -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -lssp -L$gcclibs'
flag_mwindows: '-mwindows'
compiler: mingw-w64
......
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