equal
deleted
inserted
replaced
1 # |
1 # |
2 # spec file for package MozillaFirefox |
2 # spec file for package MozillaFirefox |
3 # |
3 # |
4 # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. |
4 # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. |
5 # 2006-2018 Wolfgang Rosenauer |
5 # 2006-2018 Wolfgang Rosenauer |
6 # |
6 # |
7 # All modifications and additions to the file contributed by third parties |
7 # All modifications and additions to the file contributed by third parties |
8 # remain the property of their copyright owners, unless otherwise agreed |
8 # remain the property of their copyright owners, unless otherwise agreed |
9 # upon. The license for this file, and modifications and additions to the |
9 # upon. The license for this file, and modifications and additions to the |
17 # |
17 # |
18 |
18 |
19 |
19 |
20 # changed with every update |
20 # changed with every update |
21 %define major 64 |
21 %define major 64 |
22 %define mainver %major.0 |
22 %define mainver %major.0.2 |
23 %define orig_version 64.0 |
23 %define orig_version 64.0.2 |
24 %define orig_suffix %{nil} |
24 %define orig_suffix %{nil} |
25 %define update_channel release |
25 %define update_channel release |
26 %define branding 1 |
26 %define branding 1 |
27 %define releasedate 20181206201918 |
27 %define releasedate 20190108160530 |
28 %define source_prefix firefox-%{orig_version} |
28 %define source_prefix firefox-%{orig_version} |
29 |
29 |
30 # use clang (upstream default since 64.0) |
30 # always build with GCC as SUSE Security Team requires that |
31 %if 0%{?suse_version} > 1320 |
|
32 %define clang_build 1 |
|
33 %endif |
|
34 # Except on aarch64 due to bmo#1513605 |
|
35 # and on %%arm due to large ld memory requirements |
|
36 %ifarch %arm aarch64 |
|
37 %define clang_build 0 |
31 %define clang_build 0 |
38 %endif |
32 |
39 |
33 # PIE, full relro |
40 # PIE, full relro (x86_64 for now) |
|
41 %ifnarch %arm aarch64 |
|
42 %define build_hardened 1 |
34 %define build_hardened 1 |
43 %endif |
|
44 |
35 |
45 # Firefox only supports i686 |
36 # Firefox only supports i686 |
46 %ifarch %ix86 |
37 %ifarch %ix86 |
47 ExclusiveArch: i586 i686 |
38 ExclusiveArch: i586 i686 |
48 BuildArch: i686 |
39 BuildArch: i686 |
314 %if 0%{?clang_build} == 0 |
305 %if 0%{?clang_build} == 0 |
315 export CC=gcc |
306 export CC=gcc |
316 export CXX=g++ |
307 export CXX=g++ |
317 %endif |
308 %endif |
318 %endif |
309 %endif |
319 export CFLAGS="%{optflags} -fno-strict-aliasing" |
|
320 # boo#986541: add -fno-delete-null-pointer-checks for gcc6 |
|
321 %if 0%{?clang_build} == 0 |
|
322 %if 0%{?suse_version} > 1320 |
|
323 export CFLAGS="$CFLAGS -fno-delete-null-pointer-checks" |
|
324 %endif |
|
325 %endif |
|
326 %ifarch %arm %ix86 |
310 %ifarch %arm %ix86 |
327 # Limit RAM usage during link |
311 # Limit RAM usage during link |
328 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" |
312 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory -Wl,--reduce-memory-overheads" |
329 %endif |
313 %endif |
330 %if 0%{?build_hardened} |
314 %if 0%{?build_hardened} |
331 %ifarch x86_64 |
315 export LDFLAGS="${LDFLAGS} -fPIC -Wl,-z,relro,-z,now" |
332 export LDFLAGS="${LDFLAGS} -Wl,-z,relro,-z,now" |
|
333 %endif |
|
334 %endif |
316 %endif |
335 %ifarch ppc64 ppc64le |
317 %ifarch ppc64 ppc64le |
336 %if 0%{?clang_build} == 0 |
318 %if 0%{?clang_build} == 0 |
337 export CFLAGS="$CFLAGS -mminimal-toc" |
319 export CFLAGS="$CFLAGS -mminimal-toc" |
338 %endif |
320 %endif |
352 ac_add_options --enable-release |
334 ac_add_options --enable-release |
353 ac_add_options --enable-default-toolkit=cairo-gtk3 |
335 ac_add_options --enable-default-toolkit=cairo-gtk3 |
354 %if 0%{?suse_version} >= 1550 |
336 %if 0%{?suse_version} >= 1550 |
355 ac_add_options --disable-gconf |
337 ac_add_options --disable-gconf |
356 %endif |
338 %endif |
357 %if 0%{?build_hardened} |
|
358 %if 0%{?clang_build} == 0 |
|
359 ac_add_options --enable-pie |
|
360 %endif |
|
361 %endif |
|
362 # gcc7 (boo#104105) |
|
363 %if 0%{?suse_version} > 1320 |
|
364 ac_add_options --enable-optimize="-g -O2" |
|
365 %endif |
|
366 # bmo#1441155 - Disable the generation of Rust debug symbols on Linux32 |
339 # bmo#1441155 - Disable the generation of Rust debug symbols on Linux32 |
367 %ifarch %ix86 %arm |
340 %ifarch %ix86 %arm |
368 ac_add_options --disable-debug-symbols |
341 ac_add_options --disable-debug-symbols |
|
342 %else |
|
343 ac_add_options --enable-debug-symbols |
369 %endif |
344 %endif |
370 %if 0%{?suse_version} > 1549 |
345 %if 0%{?suse_version} > 1549 |
371 %ifnarch aarch64 ppc64 ppc64le |
346 %ifnarch aarch64 ppc64 ppc64le |
372 ac_add_options --disable-elf-hack |
347 ac_add_options --disable-elf-hack |
373 %endif |
348 %endif |