HACKS revision 1.163
11.163Schristos# $NetBSD: HACKS,v 1.163 2016/01/11 22:50:35 christos Exp $ 21.1Slukem# 31.1Slukem# This file is intended to document workarounds for currently unsolved 41.1Slukem# (mostly) compiler bugs. 51.1Slukem# 61.1Slukem# Format: 71.1Slukem# hack title 81.1Slukem# cdate creation date 91.1Slukem# mdate mod date 101.1Slukem# who responsible developer 111.1Slukem# port ... 121.1Slukem# affected ports, space separated, if not "all" 131.1Slukem# file affected file : revision : line from : line to 141.1Slukem# affected files and revision and line numbers describing hack 151.1Slukem# multiple lines if necessary. 161.1Slukem# pr NNNN ... 171.1Slukem# problem reports this hack works around, if known. Space 181.1Slukem# separated. 191.1Slukem# regress src/regress/directory/where/test/found 201.1Slukem# regression test directories, if available. 211.1Slukem# descr 221.1Slukem# insert short informal description (multi-line). (Longer ones 231.1Slukem# should be in the PR database. More formal descriptions might 241.1Slukem# be in the regress tree. See above). 251.1Slukem# kcah 261.1Slukem# closing bracket. 271.1Slukem# 281.1Slukem# this is a comment. 291.1Slukem 301.1Slukemhack netstat ieee1394 address printing. 311.1Slukemmdate 14 Nov 2000 321.1Slukemwho matt 331.1Slukemfile lib/libc/net/getnameinfo.c : 1.32 : 497 : 503 341.1Slukemdescr 351.1Slukem Because the current implementation of IP over IEEE1394, the 361.1Slukem fw device address contains more than just the IEEE1394 EUI-64. 371.1Slukem So when printing out IEEE1394 addresses, ignore the extra stuff. 381.1Slukemkcah 391.1Slukem 401.1Slukemhack xterm vs. libterm 411.1Slukemmdate 01 Aug 2000 421.1Slukemwho jdc 431.1Slukemfile xsrc/xc/programs/xterm/main.c : 1.2 : 3609 : 3614 441.1Slukempr 10383 451.1Slukemdescr 461.1Slukem In order to extend the termcap string over 1023 bytes, a ZZ entry was 471.1Slukem introduced to point to a memory location containing the full entry. 481.1Slukem Without this hack, xterm will export a termcap containing the ZZ 491.1Slukem entry, which will then be ignored by libterm. As xterm modifies the 501.1Slukem exported termcap, this would cause those modifications to be ignored. 511.1Slukemkcah 521.1Slukem 531.1Slukemhack wi-at-big-endian-bus 541.1Slukemcdate 15 Mar 2002 551.1Slukemwho martin 561.1Slukemfile dev/ic/wireg.h 571.1Slukemdescr Add an option to access the underlying bus in big endian byte order 581.1Slukem to work around deficiencies in bus_space_{read,write}_* macros. 591.1Slukem Those don't allow the implementation of a proper pcmcia bus space 601.1Slukem tag. 611.1Slukemkcah 621.1Slukem 631.3Sjdchack specific knowledge of colours in curses code 641.3Sjdccdate Sun Apr 6 11:05:24 BST 2003 651.3Sjdcwho jdc 661.3Sjdcfile lib/libcurses/color.c : r1.24 671.3Sjdcdescr 681.3Sjdc Swap red/blue and yellow/cyan colours for COLOR_OTHER. 691.3Sjdc Fix is to enhance libtermcap to understand terminfo-style % sequences. 701.3Sjdc See also: 711.5Ssalo http://mail-index.NetBSD.org/tech-userlevel/2003/04/06/0000.html 721.4Sscwkcah 731.4Sscw 741.7Shehack Compensation for differing types of LINUX_USRSTACK and USRSTACK 751.7Shecdate 21 Aug 2003 761.7Shewho he 771.7Shefile sys/miscfs/procfs/procfs_linux.c : 1.14 781.7Shedescr 791.7She Not all ports have LINUX_USRSTACK and/or USRSTACK defined as 801.7She literals/constants, but refer to variables of a type which is 811.7She not "unsigned long", causing compilation of procfs_linux.c to 821.7She fail with "makes integer from pointer without a cast". This 831.7She is observed on e.g. the sun3 port. Ideally the "types" for 841.7She symbols should be consistent across all ports. 851.25Smrgkcah 861.25Smrg 871.37Sjunyounghack gcc-strict-aliasing 881.37Sjunyoungcdate 6 August 2004 891.37Sjunyoungwho junyoung 901.37Sjunyoungpr 26516 911.37Sjunyoungfile src/usr.sbin/racoon/racoon/Makefile : 1.21 921.37Sjunyoungdescr 931.37Sjunyoung GCC issues a warning "dereferencing type-punned pointer will break 941.37Sjunyoung strict-aliasing rules" when compiling 951.37Sjunyoung crypto/dist/kame/racoon/crypto/openssl.c with -O[23s]. Note that this 961.38Sjunyoung is due to use of type casting in a non-standard way in the code and 971.38Sjunyoung not a compiler bug. Once a new release of KAME with a proper fix 981.38Sjunyoung applied is imported this should be backed out. 991.37Sjunyoungkcah 1001.37Sjunyoung 1011.80Stsutsuihack gcc4 wrong uninitialized variable 1021.58Smrgmdate 10 May 2006 1031.58Smrgwho mrg 1041.58Smrgfile bin/ksh/eval.c : 1.6 1051.58Smrgfile bin/sh/histedit.c : 1.39 1061.58Smrgfile bin/sh/parser.c : 1.60 1071.58Smrgfile crypto/dist/heimdal/kdc/524.c : 1.10 1081.58Smrgfile crypto/dist/ssh/sftp.c : 1.20 1091.58Smrgfile crypto/dist/ssh/ssh-keysign.c : 1.11 1101.58Smrgfile dist/ipf/lib/hostname.c : 1.2 1111.58Smrgfile dist/ipf/tools/ipmon.c : 1.8 1121.72Smrgfile dist/ntp/ntpd/ntp_request.c : 1.4 1131.58Smrgfile dist/ntp/ntpd/refclock_shm.c : 1.4 1141.58Smrgfile dist/ntp/sntp/timing.c : 1.3 1151.58Smrgfile dist/pppd/pppstats/pppstats.c : 1.3 1161.58Smrgfile dist/smbfs/lib/smb/rap.c : 1.6 1171.58Smrgfile dist/tcpdump/print-zephyr.c : 1.5 1181.68Smrgfile distrib/utils/sysinst/aout2elf.c : 1.12 1191.58Smrgfile gnu/libexec/uucp/uucico/uucico.c : 1.6 1201.58Smrgfile lib/libc/citrus/citrus_csmapper.c : 1.6 1211.58Smrgfile lib/libc/citrus/citrus_pivot_factory.c : 1.5 1221.58Smrgfile lib/libc/inet/inet_cidr_ntop.c : 1.3 1231.58Smrgfile lib/libc/inet/inet_ntop.c : 1.3 1241.58Smrgfile lib/libc/stdio/vfwprintf.c : 1.8 1251.69Smrgfile libexec/ld.elf_so/arch/m68k/mdreloc.c : 1.20 1261.76Smrgfile libexec/ld.elf_so/arch/powerpc/ppc_reloc.c : 1.40 1271.74Smrgfile libexec/ld.elf_so/arch/sh3/mdreloc.c : 1.22 1281.69Smrgfile libexec/ld.elf_so/arch/sparc/mdreloc.c : 1.39 1291.58Smrgfile libexec/ld.elf_so/arch/sparc64/mdreloc.c : 1.39 1301.74Smrgfile libexec/ld.elf_so/arch/vax/mdreloc.c : 1.21 1311.71Sdanfile libexec/ld.elf_so/arch/x86_64/mdreloc.c : 1.27 1321.58Smrgfile sbin/fsck_ext2fs/dir.c : 1.19 1331.58Smrgfile sbin/routed/rtquery/rtquery.c : 1.18 1341.73Sdanfile sys/arch/amd64/amd64/pmap.c : 1.26 1351.79Smrgfile sys/arch/i386/pci/piixpcib.c : 1.4 1361.80Stsutsuifile sys/arch/m68k/m68k/pmap_motorola.c : 1.4 1371.58Smrgfile sys/crypto/cast128/cast128.c : 1.9 1381.58Smrgfile sys/ddb/db_command.c : 1.86 1391.68Smrgfile sys/dev/cardbus/cardbus_map.c : 1.21 1401.58Smrgfile sys/dev/fss.c : 1.25 1411.69Smrgfile sys/dev/ic/igsfb.c : 1.39 1421.68Smrgfile sys/dev/ic/mb86950.c : 1.5 1431.58Smrgfile sys/dev/ic/midway.c : 1.71 1441.68Smrgfile sys/dev/kttcp.c : 1.18 1451.68Smrgfile sys/dev/rasops/rasops_bitops.h : 1.9 1461.68Smrgfile sys/dev/pci/cmpci.c : 1.31 1471.58Smrgfile sys/dev/pci/machfb.c : 1.45 1481.68Smrgfile sys/dev/usb/ohci.c : 1.174 1491.68Smrgfile sys/dev/usb/uhci.c : 1.196 1501.68Smrgfile sys/dev/rasops/rasops_bitops.h : 1.9 1511.58Smrgfile sys/dist/ipf/netinet/ip_nat.c : 1.10 1521.58Smrgfile sys/dist/ipf/netinet/ip_rpcb_pxy.c : 1.8 1531.58Smrgfile sys/dist/pf/net/pf.c : 1.22 1541.59Smrgfile sys/fs/udf/udf_vnops.c : 1.4 1551.58Smrgfile sys/kern/kern_sig.c : 1.219 1561.58Smrgfile sys/kern/tty.c : 1.181 1571.58Smrgfile sys/net/bpf.c : 1.116 1581.58Smrgfile sys/net/zlib.c : 1.26 1591.68Smrgfile sys/netccitt/if_x25subr.c : 1.37 1601.58Smrgfile sys/netinet/in.c : 1.107 1611.58Smrgfile sys/netsmb/smb_smb.c : 1.27 1621.58Smrgfile sys/netsmb/smb_trantcp.c : 1.22 1631.58Smrgfile sys/nfs/nfs_serv.c : 1.108 1641.58Smrgfile sys/nfs/nfs_socket.c : 1.129 1651.58Smrgfile sys/nfs/nfs_syscalls.c : 1.91 1661.58Smrgfile sys/ufs/lfs/lfs_vfsops.c : 1.207 [also (char *)] 1671.58Smrgfile usr.bin/ftp/ftp.c : 1.140 1681.58Smrgfile usr.bin/find/function.c : 1.54 1691.58Smrgfile usr.bin/mail/tty.c : 1.20 1701.100Stsutsuifile usr.bin/msgc/msg_sys.def : 1.33-1.34 1711.58Smrgfile usr.bin/nl/nl.c : 1.7 1721.58Smrgfile usr.bin/systat/keyboard.c : 1.23 1731.58Smrgfile usr.bin/usbhidctl/usbhid.c : 1.29 1741.58Smrgfile usr.bin/vi/cl/cl_read.c : 1.5 1751.58Smrgfile usr.bin/vi/ex/ex_cscope.c : 1.12 1761.58Smrgfile usr.bin/vi/ex/ex_tag.c : 1.19 1771.58Smrgfile usr.bin/vi/vi/v_txt.c : 1.15 1781.58Smrgfile usr.sbin/altq/altqstat/qdisc_rio.c : 1.4 1791.58Smrgfile usr.sbin/cron/do_command.c : 1.19 1801.58Smrgfile usr.sbin/timed/timed/slave.c : 1.15 1811.58Smrgdescr 1821.58Smrg GCC 4.1 gets many uninitialised variable warnings wrong. We should 1831.58Smrg really audit all the old hacks like this when older compilers are 1841.58Smrg removed from the tree, as many are probably no longer required. 1851.65Schristos The problem is that it does not recognize initialization via function 1861.65Schristos call pointer. I.e. 1871.65Schristos int p; 1881.65Schristos foo(&p); 1891.65Schristos does not mark p as initialized. 1901.58Smrgkcah 1911.58Smrg 1921.59Smrghack gcc4 pointer sign and strict aliasing problems 1931.59Smrgmdate 10 May 2006 1941.59Smrgwho mrg 1951.59Smrgfile bin/ed/Makefile : 1.33 1961.68Smrgfile distrib/utils/sysinst/Makefile.inc : 1.44 1971.91Smartinfile distrib/utils/x_dhclient/Makefile : 1.15 1981.60Smrgfile games/bcd/Makefile : 1.5 1991.60Smrgfile games/dab/Makefile : 1.5 2001.60Smrgfile games/larn/Makefile : 1.17 2011.60Smrgfile games/pom/Makefile : 1.5 2021.60Smrgfile lib/libasn1/Makefile : 1.26 2031.60Smrgfile lib/libcrypt/Makefile : 1.17 2041.60Smrgfile lib/libgssapi/Makefile : 1.16 2051.60Smrgfile lib/libhdb/Makefile : 1.20 2061.60Smrgfile lib/libkadm5clnt/Makefile : 1.21 2071.60Smrgfile lib/libkadm5srv/Makefile : 1.25 2081.60Smrgfile lib/libkrb5/Makefile : 1.35 2091.60Smrgfile lib/libssh/Makefile : 1.6 2101.60Smrgfile lib/libtelnet/Makefile : 1.26 2111.60Smrgfile libexec/getty/Makefile : 1.14 2121.60Smrgfile libexec/kadmind/Makefile : 1.19 2131.60Smrgfile libexec/kpasswdd/Makefile : 1.14 2141.60Smrgfile sbin/atactl/Makefile : 1.3 2151.60Smrgfile sbin/cgdconfig/Makefile : 1.7 2161.60Smrgfile sbin/clri/Makefile : 1.13 2171.60Smrgfile sbin/dkctl/Makefile : 1.4 2181.60Smrgfile sbin/dump/Makefile : 1.33 2191.60Smrgfile sbin/fdisk/Makefile : 1.35 2201.60Smrgfile sbin/fsck_ext2fs/Makefile : 1.11 2211.60Smrgfile sbin/fsck_ffs/Makefile : 1.29 2221.60Smrgfile sbin/fsdb/Makefile : 1.18 2231.60Smrgfile sbin/mount_smbfs/Makefile : 1.4 2241.60Smrgfile sbin/newfs/Makefile : 1.30 2251.60Smrgfile sbin/newfs_sysvbfs/Makefile : 1.2 2261.60Smrgfile sbin/restore/Makefile : 1.23 2271.60Smrgfile sbin/veriexecctl/Makefile : 1.11 2281.64Smrgfile sys/lib/libsa/Makefile : 1.59 2291.68Smrgfile sys/arch/evbarm/adi_brh/brh_machdep.c : 1.24 2301.59Smrgfile usr.bin/awk/Makefile : 1.9 2311.64Smrgfile usr.bin/crontab/Makefile : 1.24 2321.60Smrgfile usr.bin/ctags/Makefile : 1.8 2331.61Smrgfile usr.bin/gzip/Makefile : 1.10 2341.60Smrgfile usr.bin/ssh/sftp/Makefile : 1.10 2351.60Smrgfile usr.bin/ssh/ssh/Makefile : 1.25 2361.59Smrgfile usr.bin/vi/build/Makefile : 1.26 2371.60Smrgfile usr.bin/telnet/Makefile : 1.40 2381.60Smrgfile usr.bin/tn3270/tn3270/Makefile : 1.36 2391.60Smrgfile usr.bin/tr/Makefile : 1.4 2401.59Smrgfile usr.sbin/amd/amd/Makefile : 1.27 2411.59Smrgfile usr.sbin/amd/amq/Makefile : 1.14 2421.59Smrgfile usr.sbin/amd/libamu/Makefile : 1.20 2431.59Smrgfile usr.sbin/amd/pawd/Makefile : 1.5 2441.59Smrgfile usr.sbin/bind/Makefile.inc : 1.22 2451.60Smrgfile usr.sbin/bind/libdns/Makefile : 1.3 2461.60Smrgfile usr.sbin/bind/named/Makefile : 1.17 2471.60Smrgfile usr.sbin/bootp/bootptest/Makefile : 1.2 2481.60Smrgfile usr.sbin/chrtbl/Makefile : 1.6 2491.60Smrgfile usr.sbin/cron/Makefile : 1.12 2501.59Smrgfile usr.sbin/dhcp/Makefile.inc : 1.20 2511.59Smrgfile usr.sbin/dumplfs/Makefile : 1.11 2521.60Smrgfile usr.sbin/hprop/Makefile : 1.13 2531.60Smrgfile usr.sbin/installboot/Makefile : 1.35 2541.59Smrgfile usr.sbin/ipf/ipftest/Makefile : 1.32 2551.59Smrgfile usr.sbin/isdn/isdnd/Makefile : 1.6 2561.59Smrgfile usr.sbin/isdn/isdnmonitor/Makefile : 1.3 2571.59Smrgfile usr.sbin/isdn/isdntel/Makefile : 1.2 2581.59Smrgfile usr.sbin/isdn/isdntrace/Makefile : 126 2591.61Smrgfile usr.sbin/mopd/common/Makefile : 1.10 2601.61Smrgfile usr.sbin/mopd/mopd/Makefile : 1.9 2611.61Smrgfile usr.sbin/mopd/mopprobe/Makefile : 1.7 2621.60Smrgfile usr.sbin/makefs/Makefile : 1.17 2631.60Smrgfile usr.sbin/mscdlabel/Makefile : 1.5 2641.60Smrgfile usr.sbin/pkg_install/add/Makefile : 1.7 2651.60Smrgfile usr.sbin/pkg_install/create/Makefile : 1.5 2661.60Smrgfile usr.sbin/pkg_install/lib/Makefile : 1.28 2671.59Smrgfile usr.sbin/ntp/ntpd/Makefile : 1.10/1.11 2681.59Smrgfile usr.sbin/ntp/ntptime/Makefile : 1.4/1.5 2691.59Smrgfile usr.sbin/pppd/Makefile.inc : 1.3 2701.59Smrgfile usr.sbin/pppd/pppd/Makefile : 1.38 2711.60Smrgfile usr.sbin/rarpd/Makefile : 1.10 2721.59Smrgfile usr.sbin/rbootd/Makefile : 1.10 2731.60Smrgfile usr.sbin/rpc.pcnfsd/Makefile : 1.17 2741.59Smrgfile usr.sbin/rtadvd/Makefile : 1.9 2751.60Smrgfile usr.sbin/tcpdump/Makefile : 1.42 2761.59Smrgfile usr.sbin/wiconfig/Makefile : 1.3 2771.59Smrgdescr 2781.59Smrg GCC 4.1 warns on pointer sign comparision/assignments and lots of 2791.59Smrg code does not conform. For now we use -Wno-pointer-sign and 2801.59Smrg -fno-strict-aliasing. 2811.59Smrgkcah 2821.59Smrg 2831.145Schristoshack disable ctf for gcc-4.8 build 2841.145Schristosmdate April 3 2014 2851.146Swizwho christos 2861.145Schristosfile external/gpl3/gcc/usr.bin/Makefile.frontend : 1.4 2871.145Schristosfile external/gpl3/gcc/usr.bin/Makefile.backend : 1.5 2881.145Schristosdescr 2891.145Schristos nbctfconvert -g -L VERSION -g fold-const.o 2901.145Schristos ERROR: fold-const.c: failed to get mapping for tid 79154 \ 2911.145Schristos ((null)) <13532> 2921.145Schristoskcak 2931.145Schristos 2941.121Schristoshack emacs aborting on exit (libgcc issue) 2951.121Schristosmdate 7 November 2011 2961.121Schristoswho christos 2971.121Schristosfile external/gpl3/gcc/dist/gcc/unwind-dw2-fde.c : 1.2 2981.121Schristosdescr 2991.121Schristos GCC 4.5.3 now calls __unregister_frame_info_bases() on unloading/exit 3001.121Schristos to do just that. If the symbol requested is not found, then it aborts. 3011.121Schristos emacs 23.3 triggers this assertion. For now disable aborting, and 3021.121Schristos silently ignore. 3031.121Schristoskcah 3041.121Schristos 3051.105Sagchack cross-building hack on Darwin 3061.105Sagcmdate 20 July 2008 3071.105Sagcwho agc 3081.105Sagcfile src/distrib/common/Makefile.mdset : 1.33 3091.105Sagcdescr 3101.105Sagc Darwin has problems with getopt() when used in mdsetimage -v, 3111.105Sagc due to the difference between BSD and libiberty() getopt 3121.105Sagc implementations, more fully described in 3131.105Sagc http://mail-index.netbsd.org/current-users/2008/06/27/msg003242.html 3141.105Sagc and the subsequent thread. For just now, we just have an ugly 3151.105Sagc workaround not to call mdsetimage with the -v argument on Darwin 3161.105Sagckcah 3171.105Sagc 3181.109Sveegohack avoid rebuilding asn1 libraries 3191.109Sveegomdate 03 August 2008 3201.109Sveegowho veego 3211.109Sveegofile src/crypto/dist/heimdal/lib/asn1/gen.c : 1.10 3221.109Sveegofile src/lib/libasn1/Makefile : 1.32 3231.109Sveegofile src/lib/libhdb/Makefile : 1.23 3241.109Sveegofile src/lib/libgssapi/Makefile : 1.20 3251.109Sveegofile src/lib/libhx509/Makefile : 1.3 3261.109Sveegopr 9702 39185 3271.109Sveegodescr 3281.109Sveego asn1_compile does not check if generated header files do not have to 3291.109Sveego be rebuild. 3301.109Sveego Generate .hx files and copy it in the Makefiles if they changed. 3311.109Sveegokcah 3321.109Sveego 3331.111Stsutsuihack avoid gcc4 -O1 bug in loop optimize 3341.111Stsutsuicdate 29 November 2008 3351.111Stsutsuiwho tsutsui 3361.111Stsutsuifile src/sbin/ifconfig/Makefile : 1.39 3371.111Stsutsuipr 40036 40066 3381.111Stsutsuidescr 3391.111Stsutsui gcc -O1 seems to generate wrong code in loop optimize so that 3401.111Stsutsui ifconfig lo0 inet6 doesn't return error even if a kernel 3411.111Stsutsui doesn't have IPv6 support. (see the above PRs for details) 3421.111Stsutsui For workaround, specify -fno-loop-optimize on m68000, 3431.111Stsutsui which uses -O1 by default. 3441.111Stsutsuikcah 3451.111Stsutsui 3461.114Schristoshack MKPIE ldscript for /usr.sbin/crash 3471.114Schristoscdate 22 April 2010 3481.114Schristoswho christos 3491.114Schristosfile src/usr.sbin/crash/Makefile : 1.5 3501.114Schristosfile src/usr.sbin/crash/ldscript.crash : 1.1 3511.114Schristospr N/A 3521.114Schristosdescr 3531.114Schristos fixed in binutils-2.20.1. Linking with MKPIE=yes causes overlapping 3541.114Schristos sections 3551.114Schristoskcah 3561.114Schristos 3571.144Stronhack Disable fortification for /usr/bin/makeinfo 3581.144Stroncdata 24 Mar 2014 3591.144Stronwho tron 3601.144Stronfile src/gnu/usr.bin/texinfo/makeinfo/Makefile : 1.8 3611.144Stronpr N/A 3621.144Strondescr 3631.144Stron If "makeinfo" is compiled with "-D_FORTIFY_SOURCE=2" using GCC 4.8.3 3641.144Stron it fails to process certain texinfo files, e.g. "cl.texi" 3651.144Stron included in the Emacs 24.3 distribution. 3661.144Stronkcah 3671.144Stron 3681.147Stronhack Disable Stack Smash Protection for /usr/X11R7/bin/xauth 3691.147Stroncdata 05 Apr 2014 3701.147Stronwho tron 3711.147Stronfile src/external/mit/xorg/bin/xauth/Makefile : 1.4 3721.147Stronpr N/A 3731.147Strondescr 3741.147Stron If "xauth" is compile with "USE_SSP" set to "yes" it fails 3751.147Stron mysteriously with an error message like this: 3761.147Stron 3771.147Stron /usr/X11R7/bin/xauth: file /foo/bar/.Xauthority does not exist 3781.147Stron /usr/X11R7/bin/xauth: unable to link authority file /foo/bar/.Xauthority, use /foo/bar/.Xauthority 3791.147Stron 3801.147Stron The compiler seems to get confused about the two filename variables 3811.147Stron used in the link(2) system call. 3821.147Stronkcah 3831.147Stron 3841.162Spookahack g++ 5.x barfs on volatile in constexpr initializers 3851.162Spookacdata 27 Aug 2015 3861.160Spookawho pooka 3871.162Spookafile src/lib/libpthread/pthread_types.h : 1.17 3881.160Spookapr lib/49989 3891.160Spookadescr 3901.160Spooka Trying to use e.g. pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER 3911.160Spooka in C++ results in: 3921.160Spooka error: temporary of non-literal type '__pthread_mutex_st' 3931.160Spooka in a constant expression 3941.160Spooka constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {} 3951.160Spooka [...] 3961.160Spooka include/pthread_types.h:101:8: note: '__pthread_mutex_st' is 3971.160Spooka not literal because: 3981.160Spooka struct __pthread_mutex_st { 3991.160Spooka ^ 4001.160Spooka include/pthread_types.h:103:17: note: non-static data 4011.160Spooka member '__pthread_mutex_st::ptm_errorcheck' has volatile type 4021.160Spooka pthread_spin_t ptm_errorcheck; 4031.160Spookakcah 4041.160Spooka 4051.163Schristoshack libm cabs{,f,l} and g++ 4061.163Schristoscdata 11 Jan 2016 4071.163Schristoswho christos 4081.163Schristospr lib/50646 4091.163Schristosfile src/external/gpl3/gcc.old/dist/libstdc++-v3/include/std/complex : 1.2 4101.163Schristosfile src/external/gpl3/gcc/dist/libstdc++-v3/include/std/complex : 1.2 4111.163Schristosdescr 4121.163Schristos Our cabs and cabsf have a different argument format on some architectures 4131.163Schristos and for that we have created in libm/compat_cabs{,f}.c. The standard 4141.163Schristos versions in libc are __c99_cabs{,f,l} and there are __RENAME()'s in 4151.163Schristos <complex.h>. G++ uses __builtin_cabs{,f,l} to implement those and they 4161.163Schristos translate by default to cabs{,f,l} which gets defined to cabs{,f} (the 4171.163Schristos wrong function) and an undefined cabsl. I've changed <complex> to use 4181.163Schristos the __c99_cabs{,f,l} directly. Using the __builtin_cabs{,f,l} in gcc is 4191.163Schristos still broken. 4201.163Schristoskcah 4211.163Schristos 4221.21Smycroftport vax 4231.21Smycroft 4241.102Stsutsui hack gcc4/vax ICE 4251.102Stsutsui cdate 4261.102Stsutsui who tsutsui 4271.102Stsutsui file sys/arch/vax/conf/Makefile.vax 4281.102Stsutsui descr 4291.102Stsutsui GCC4 on vax gets ICE on compiling sys/ddb/db_command.c. 4301.102Stsutsui -fno-tree-ter prevents it so add it to COPTS. 4311.102Stsutsui kcah 4321.102Stsutsui 4331.81Smrg hack gcc4/vax compiler crash 4341.81Smrg cdate Fri Jun 30 22:39:12 PDT 2006 4351.81Smrg who mrg 4361.81Smrg file bin/csh/Makefile : 1.27 4371.81Smrg file lib/i18n_module/UTF7/Makefile : 1.2 4381.81Smrg descr 4391.81Smrg GCC4 on vax crashes. -O0 stops it happening so far... 4401.81Smrg kcah 4411.81Smrg 4421.52Sjmc hack gcc 2.95/vax doesn't like abort being used as function pointer 4431.52Sjmc cdate Tue Dec 13 05:54:50 GMT 2005 4441.52Sjmc who jmc 4451.52Sjmc file lib/libc/rpc/svc_vc.c 1.15 4461.52Sjmc descr 4471.52Sjmc Provide a local definition for abort which doesn't include 4481.52Sjmc the noreturn attribute which trips up gcc 2.95 on vax. 4491.81Smrg kcah 4501.52Sjmc 4511.45Sjmc hack gcc 2.95/vax doesn't have stdbool.h and gettext needs it 4521.45Sjmc cdate Mon May 9 12:16:22 CDT 2005 4531.45Sjmc who jmc 4541.45Sjmc file gnu/usr.bin/gettext/Makefile.inc.prog 1.5 4551.45Sjmc gnu/usr.bin/gettext/libgrep/Makefile 1.3 4561.45Sjmc gnu/usr.bin/gettext/libnlspr/Makefile 1.5 4571.45Sjmc gnu/usr.bin/gettext/libnlsut/Makefile 1.3 4581.45Sjmc descr 4591.45Sjmc The latest gettext assumes a C99 environment or at least 4601.45Sjmc configure checks to work around this. As we don't use configure 4611.45Sjmc provide a stdbool.h for vax builds locally in directories from 4621.45Sjmc the template provided by the gettext code. 4631.81Smrg kcah 4641.45Sjmc 4651.21Smycroft hack gcc 2.95/vax cannot handle __builtin_ffs() 4661.21Smycroft cdate Fri Aug 23 21:31:15 CEST 2002 4671.21Smycroft who ragge 4681.21Smycroft file sys/lib/libkern/libkern.h : 1.42 4691.21Smycroft descr 4701.21Smycroft __builtin_ffs() is ifdef'd away if __vax__. Matt Thomas has 4711.21Smycroft added this feature to GCC 3 so it can be removed when switching. 4721.81Smrg kcah 4731.21Smycroft 4741.102Stsutsui hack gcc 2.95/vax libbz2 4751.21Smycroft mdate 27 Jun 2002 4761.21Smycroft who thorpej 4771.21Smycroft file lib/libbz2/Makefile 4781.21Smycroft descr 4791.21Smycroft libbz2 is mis-compiled with optimization with GCC 2.95.3 4801.24Sragge on VAX. -O0 works around this problem. 4811.24Sragge kcah 4821.24Sragge 4831.21Smycroft hack vax Toolchain bug 4841.21Smycroft cdate 28 Mar 2003 4851.21Smycroft who he 4861.21Smycroft file sys/arch/vax/vax/intvec.S : 1.5 4871.21Smycroft descr 4881.21Smycroft Workaround for PR toolchain/20924. The assembler apparently 4891.21Smycroft tries to range-check byte offsets when it doesn't have 4901.21Smycroft sufficient information to make that decision. 4911.21Smycroft Workaround uses `brw' instead of `brb' instruction. 4921.23She kcah 4931.23She 4941.23She hack vax gcc 2.95.3 -Wuninitialized workarounds 4951.23She cdate 6 Nov 2003 4961.23She who he 4971.23She file sys/dev/bi/if_ni.c : 1.22 4981.23She file sys/arch/vax/vax/ctu.c : 1.20 4991.23She descr 5001.23She Workaround for gcc 2.95.3 failing to detect that certain 5011.23She variables will be initialized; so that this code compiles 5021.23She with -Wuninitialized. Should be reviewed and possibly 5031.23She reverted when gcc 3.3.2 is ready for vax. 5041.21Smycroft kcah 5051.21Smycroft 5061.34Scl hack vax gcc 2.95.3 structure initialization 5071.34Scl cdat 13 May 2004 5081.34Scl who cl 5091.34Scl file sys/miscfs/kernfs/kernfs_vnops.c : 1.104 5101.34Scl descr 5111.34Scl Workaround for gcc 2.95.3 failing to initialize structures 5121.34Scl and/or unions inside structures using nested designators. 5131.34Scl Should be reverted when gcc >=3.3.3 is ready for vax. 5141.34Scl kcah 5151.21Smycroft 5161.35She hack vax gcc 2.95.3 needs -I. to build nslexer.c 5171.35She cdat 6 Jun 2004 5181.36She who mhitch 5191.36She file lib/libc/arch/vax/Makefile.inc : 1.6 5201.35She descr 5211.35She It appears necessary to add -I. to CPPFLAGS when building 5221.35She nslesxer.c. This may be caused by gcc 2.95.3 being used. 5231.35She Should be reverted when a newer gcc is ready for vax. 5241.35She kcah 5251.35She 5261.43Stron hack vax gcc 2.95.3 doesn't understand "-std=c99" 5271.43Stron cdat 5 April 2005 5281.43Stron who tron 5291.43Stron file src/share/mk/bsd.sys.mk 5301.43Stron descr 5311.43Stron We cannot use "-std=c99" for compiler warning level 4 and above 5321.43Stron because gcc 2.95.3 doesn't support that option. 5331.43Stron kcah 5341.43Stron 5351.54She hack declare boolean_t in two IPF user-mode programs 5361.54She cdate Tue Mar 7 19:19:20 CET 2006 5371.54She who he 5381.54She file dist/ipf/ipsend/iptests.c : 1.8 5391.54She dist/ipf/ipsend/sock.c : 1.7 5401.54She descr 5411.54She The IPF user-mode programs ipsend and iptest first 5421.54She include <sys/types.h> without _KERNEL defined, and 5431.54She later include <sys/file.h> with _KERNEL defined. 5441.54She This causes a build failure when building for vax, 5451.54She since <sys/device.h> ends up being included without 5461.54She bollean_t being defined by <sys/types.h>. 5471.54She Build failure and further details documented in 5481.54She PR#32907. 5491.54She kcah 5501.54She 5511.104Sgmcgarry hack pcc 0.9.9 large string literals 5521.104Sgmcgarry cdat 8 July 2008 5531.104Sgmcgarry who gmcgarry 5541.104Sgmcgarry file sys/conf/param.c : 1.58 5551.104Sgmcgarry descr 5561.104Sgmcgarry Workaround for pcc 0.9.9 not handling large string literals 5571.104Sgmcgarry which causes kernels with 'options INCLUDE_CONFIG_FILE' to 5581.104Sgmcgarry fail compilation. 5591.104Sgmcgarry There is a proposal on the pcc mailing list to stuff config 5601.104Sgmcgarry file in ELF section. 5611.104Sgmcgarry kcah 5621.104Sgmcgarry 5631.107Smrg hack xorg warnings 5641.129Schristos cdat 30 July 2008, 3 June, 2013 5651.107Smrg who mrg 5661.108Smrg file external/mit/xorg/lib/libSM/Makefile : 1.2 5671.129Schristos external/mit/xorg/lib/libX11/Makefile.libx11 : 1.10 5681.107Smrg external/mit/xorg/lib/libXext/Makefile : 1.2 5691.107Smrg external/mit/xorg/lib/libXfont/Makefile : 1.2 5701.107Smrg descr 5711.107Smrg Disable several warnings or use -Wno-error across Xorg sources 5721.107Smrg while we get them working 5731.107Smrg kcah 5741.107Smrg 5751.112Schristos hack 32 bit time leftovers 5761.112Schristos cdat 11 January 2009 5771.112Schristos who christos 5781.112Schristos file lib/libc/time/localtime.c : 1.41 5791.112Schristos lib/libc/time/zic.c : 1.23 5801.112Schristos descr 5811.112Schristos The timezone compiled files still contain 32 bit time_t 5821.112Schristos quantities. I did not want to version the files because 5831.112Schristos the ``parser'' is too ugly for words. What needs to be 5841.112Schristos done, is to rewrite the parser from scratch also to avoid 5851.112Schristos potential core-dumps from parsing invalid files. 5861.112Schristos kcah 5871.112Schristos 5881.112Schristos hack 32 bit time leftovers 5891.112Schristos cdat 11 January 2009 5901.112Schristos who christos 5911.112Schristos file various 5921.112Schristos descr 5931.113Ssketch Many filesystem on-disk formats have 32 bit times. 5941.112Schristos kcah 5951.112Schristos 5961.141Schristos hack gcc 4.5 fsdb miscompile 5971.140Schristos date Sat Nov 9 11:03:02 EST 2013 5981.140Schristos who christos 5991.141Schristos file src/sbin/fsdb/Makefile : 1.36 (and earlier) 6001.140Schristos descr 6011.140Schristos src/sbin/fsdb/fsdb.c: In function 'findblk': 6021.140Schristos src/sbin/fsdb/fsdb.c:610:1: error: unrecognizable insn: 6031.140Schristos (insn 941 940 942 134 src/sbin/fsdb/fsdb.c:589 (set (reg:SI 604) 6041.140Schristos (subreg:SI (mem/s/j:DI (plus:SI (mult:SI (reg:SI 602) 6051.140Schristos (const_int 8 [0x8])) 6061.140Schristos (reg/f:SI 601)) [0 curinode.99_378->dp2.di_ib S8 A32]) 4)) \ 6071.140Schristos -1 (nil)) 6081.140Schristos src/sbin/fsdb/fsdb.c:610:1: internal compiler error: in \ 6091.140Schristos extract_insn, at recog.c:2103 6101.140Schristos kcah 6111.140Schristos 6121.141Schristos hack gcc 4.8 gcc miscompiles 6131.141Schristos date Sat Nov 9 16:35:18 EST 2013 6141.141Schristos who christos 6151.141Schristos file distrib/utils/x_ping/Makefile 6161.141Schristos file distrib/vax/miniroot/Makefile.inc 6171.141Schristos file distrib/vax/ramdisk/Makefile 6181.141Schristos file external/gpl3/gdb/lib/libdecnumber/Makefile 6191.141Schristos file sbin/fsdb/Makefile 6201.141Schristos file sbin/newfs_ext2fs/Makefile 6211.141Schristos file sbin/ping/Makefile 6221.141Schristos file usr.sbin/lmcconfig/Makefile 6231.141Schristos file usr.sbin/mtrace/Makefile 6241.141Schristos descr 6251.141Schristos external/gpl3/gcc/dist/gcc/expmed.c:2781:1: 6261.141Schristos internal compiler error: in change_address_1, at emit-rtl.c:2019 6271.141Schristos external/gpl3/gcc/dist/gcc/recog.c:770:1: 6281.141Schristos internal compiler error: in change_address_1, at emit-rtl.c:2019 6291.141Schristos external/gpl3/gcc/dist/libdecnumber/decNumber.c:7214:3: 6301.141Schristos internal compiler error: in change_address_1, at emit-rtl.c:2019 6311.141Schristos sbin/ping/ping.c:679:1: 6321.141Schristos internal compiler error: in change_address_1, at emit-rtl.c:2019 6331.141Schristos sbin/newfs_ext2fs/mke2fs.c:681:1: 6341.141Schristos internal compiler error: in reload_combine_note_use, 6351.141Schristos at postreload.c:1561 6361.141Schristos external/gpl3/gdb/dist/libdecnumber/decNumber.c:7214:3: 6371.141Schristos internal compiler error: in change_address_1, at emit-rtl.c:2019 6381.141Schristos usr.sbin/lmcconfig/lmcconfig.c:939:3: 6391.141Schristos internal compiler error: in reload_combine_note_use, 6401.141Schristos at postreload.c:1561 6411.141Schristos usr.sbin/mtrace/mtrace.c:1655:1: 6421.141Schristos internal compiler error: in change_address_1, at emit-rtl.c:2019 6431.141Schristos kcah 6441.141Schristos 6451.21Smycroftport arm 6461.21Smycroft 6471.21Smycroft hack gcc-unsigned-compare 6481.21Smycroft cdate 09 Mar 2002 6491.21Smycroft mdate 18 Mar 2002 6501.21Smycroft who bjh21 6511.21Smycroft file dist/bind/lib/nameser/ns_parse.c : 1.3 6521.21Smycroft file dist/dhcp/minires/ns_parse.c : 1.3 6531.21Smycroft file dist/dhcp/omapip/result.c : 1.2 6541.21Smycroft file dist/dhcp/server/failover.c : 1.3 6551.21Smycroft file gnu/dist/toolchain/bfd/bfd.c : 1.2 6561.21Smycroft file gnu/dist/toolchain/bfd/format.c : 1.2 6571.21Smycroft file gnu/dist/toolchain/gdb/target.c : 1.2 6581.21Smycroft file sys/kern/vfs_subr.c : 1.172 6591.21Smycroft descr When checking that a potentially-unsigned enum is >= 0, assign 6601.21Smycroft it to an int first. This is necessary to avoid "comparison is 6611.21Smycroft always true" warnings with -fshort-enums. Casting to an int 6621.21Smycroft really should be enough, but turns out not to be. 6631.21Smycroft kcah 6641.21Smycroft 6651.122Stsutsui hack gcc-4.5 arm CNAME hostname lookup failure on 6661.122Stsutsui certain DNS environment (probably -ftree-ter problem) 6671.122Stsutsui cdate Sat Dec 24 04:59:00 UTC 2011 6681.122Stsutsui mdate 6691.122Stsutsui who tsutsui 6701.122Stsutsui file lib/libc/net/Makefile.inc 1.79 6711.122Stsutsui descr Hostname lookup against CNAMEs by some commands fails 6721.122Stsutsui on certain DNS environments if lib/libc/net/gethnamaddr.c 6731.122Stsutsui (ping(8) etc) and lib/libc/net/getaddrinfo.c (ftp(1) etc) 6741.122Stsutsui are compiled with -O2, even though nslookup(1) against 6751.122Stsutsui the same CNAME returns proper hostname. 6761.122Stsutsui They works properly if compiled with -O2 -fno-tree-ter. 6771.122Stsutsui Also -O2 fails but -O2 -fno-tree-ter works on the following 6781.122Stsutsui test case in gcc bugzilla: 6791.122Stsutsui http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48863#c4 6801.122Stsutsui kcah 6811.122Stsutsui 6821.124Smsaitoh hack gcc-4.5 arm without -fno-tree-vrp generate broken code 6831.124Smsaitoh cdate Wed Nov 14 13:02:02 JST 2012 6841.124Smsaitoh who msaitoh 6851.124Smsaitoh file lib/libc/softfloat/Makefile.inc 6861.124Smsaitoh pr 46953 6871.124Smsaitoh regress src/tests/lib/libm/t_cbrt 6881.124Smsaitoh regress src/tests/lib/libm/t_ceil 6891.124Smsaitoh regress src/tests/lib/libm/t_exp 6901.124Smsaitoh regress src/tests/lib/libm/t_log 6911.124Smsaitoh regress src/tests/lib/libm/t_scalbn 6921.124Smsaitoh regress src/tests/lib/libm/t_sinh 6931.124Smsaitoh regress src/tests/lib/libm/t_sqrt 6941.124Smsaitoh descr Gcc has a bug in tree optimization. For adddf3, 6951.124Smsaitoh -INF + -INF returns 0 without -fno-tree-vrp. 6961.124Smsaitoh Debugging with -fdump-tree-all shows that 6971.124Smsaitoh softfloat.c.021t.cleanup_cfg is ok but softfloat.c.023t.ssa 6981.124Smsaitoh is broken. 6991.124Smsaitoh kcah 7001.21Smycroft 7011.21Smycroftport sh3 7021.21Smycroft 7031.74Smrg hack gcc4-sh3-bz2 7041.103Stsutsui cdate Sun May 21 03:34:57 UTC 2006 7051.103Stsutsui mdate Fri May 16 13:13:00 UTC 2008 7061.103Stsutsui who mrg, tsutsui 7071.74Smrg file lib/libbz2/Makefile : 1.10 7081.74Smrg descr 7091.74Smrg The in-tree GCC 4.1-based compiler generated too-far 7101.103Stsutsui pc-relative addresses. Hack is to build with 7111.103Stsutsui -fno-loop-optimize. 7121.74Smrg kcah 7131.74Smrg 7141.138Schristosport sh3eb 7151.137Schristos hack gcc4.8.1 7161.137Schristos cdate Thu Nov 7 16:31:23 EST 2013 7171.137Schristos who christos 7181.137Schristos file src/sys/rump/net/lib/libnetbt/Makefile : 1.2 7191.137Schristos desrc 7201.138Schristos for profiling 7211.137Schristos compile l2cap_signal.c with -O0 to avoid: 7221.137Schristos ./netbt/l2cap_signal.c:36: 7231.137Schristos /p/netbsd/cvsroot/src/sys/rump/net/lib/libnetbt/../../../../\ 7241.137Schristos netbt/l2cap_signal.c: In function 'l2cap_recv_signal': 7251.137Schristos ./sh3/byte_swap.h:20:2: error: 'asm' operand requires \ 7261.137Schristos impossible reload 7271.137Schristos __asm volatile ("swap.b %1,%0" : "=r"(rval) : "r"(x)); 7281.137Schristos kcah 7291.21Smycroft 7301.138Schristosport sh3el 7311.138Schristos hack gcc4.8.1 7321.138Schristos cdate Fri Nov 8 19:27:01 EST 2013 7331.138Schristos who christos 7341.138Schristos file src/external/bsd/libevent/lib/libevent/Makefile : 1.2 7351.138Schristos desrc 7361.138Schristos for profiling 7371.138Schristos compile evdns.c with -O0 to avoid: 7381.138Schristos ./sh3/byte_swap.h:20:2: error: 'asm' operand requires \ 7391.138Schristos impossible reload 7401.138Schristos __asm volatile ("swap.b %1,%0" : "=r"(rval) : "r"(x)); 7411.138Schristos kcah 7421.139Schristos 7431.139Schristos hack gcc4.8.1 7441.139Schristos cdate Fri Nov 8 19:34:48 EST 2013 7451.139Schristos who christos 7461.139Schristos file src/usr.sbin/racoon/Makefile : 1.27 7471.139Schristos desrc 7481.139Schristos for profiling 7491.139Schristos compile ipsec_doi.c with -O0 to avoid: 7501.139Schristos ./sh3/byte_swap.h:20:2: error: 'asm' operand requires \ 7511.139Schristos impossible reload 7521.139Schristos __asm volatile ("swap.b %1,%0" : "=r"(rval) : "r"(x)); 7531.139Schristos kcah 7541.138Schristos 7551.96Smrgport m68000 7561.79Smrg 7571.96Smrg hack gcc4-m68000 7581.102Stsutsui cdate Fri Feb 8 10:29:37 PST 2008 7591.102Stsutsui mdate Sun May 4 15:37:19 UTC 2008 7601.99Stsutsui who mrg, tsutsui 7611.96Smrg file rescue/Makefile : 1.21 7621.99Stsutsui file sbin/dump_lfs/Makefile : 1.9 7631.101Stsutsui file sbin/fsck_ffs/Makefile : 1.35 7641.101Stsutsui file sbin/fsdb/Makefile : 1.22 7651.101Stsutsui file share/mk/sys.mk : 1.96 7661.99Stsutsui file usr.sbin/ndbootd/Makefile : 1.5 7671.95Smrg descr 7681.101Stsutsui Several internal compiler errors with gcc -O1 7691.101Stsutsui around 64bit integer arithmetic. 7701.99Stsutsui This hack uses -O1 and adds some -fno-tree-foo options 7711.99Stsutsui to avoid the problem. 7721.101Stsutsui This might be related with GCC Bugzilla Bug 32424. 7731.95Smrg kcah 7741.95Smrg 7751.141Schristosport m68k,sh3,vax 7761.135Schristos 7771.135Schristos hack gcc-4.8.1 7781.135Schristos cdate Wed Nov 6 20:41:35 EST 2013 7791.135Schristos who christos 7801.141Schristos file src/external/gpl3/gcc/libstdc++-v3/Makefile : 1.6 7811.135Schristos descr 7821.135Schristos compile hashtable_c++0x.cc with -O2 instead of -Os to 7831.135Schristos produce missing instantiation of std::lower_bound expansion 7841.135Schristos for unsigned long. 7851.135Schristos kcah 7861.22Smrg 7871.116Smrgport sparc 7881.116Smrg 7891.116Smrg hack avoid NULL pointer derefs in savefpstate IPIs and GCC 4.5.3 7901.116Smrg cdate Sun Aug 14 19:26:48 PDT 2011 7911.116Smrg who mrg 7921.116Smrg file sys/arch/sparc64/sparc/cpu.c : 1.234 7931.116Smrg file sys/arch/sparc64/sparc/cpuvar.h : 1.90 7941.116Smrg file sys/arch/sparc64/sparc/genassym.cf : 1.67 7951.116Smrg file sys/arch/sparc64/sparc/locore.s : 1.265 7961.116Smrg descr 7971.116Smrg Something is wrong with GCC 4.5.3 and the savefpstate IPI. 7981.116Smrg Post newlock2 there was a bug where a lock was reduced from 7991.116Smrg IPL_SCHED to IPL_VM (?) and occasionally savefpstate IPI 8001.116Smrg would crash due to NULL IPI. This was fixed by re-using the 8011.116Smrg right IPL value. However, GCC 4.5.3 build kernels have the 8021.116Smrg same problems. For now, the hack is re-instated. 8031.116Smrg kcah 8041.116Smrg 8051.116Smrg 8061.51Ssimonbport mips 8071.51Ssimonb 8081.51Ssimonb hack mips-shared-linker-load-address 8091.51Ssimonb cdate Fri Oct 7 08:33:10 UTC 2005 8101.51Ssimonb who simonb 8111.51Ssimonb file src/sys/kern/exec_elf32.c : 1.107 8121.51Ssimonb descr 8131.51Ssimonb With COMPAT_16 or previous enabled (which enables 8141.51Ssimonb ELF_INTERP_NON_RELOCATABLE) a recent ld.elf_so will 8151.51Ssimonb load and run at address 0. The check to fix this in 8161.51Ssimonb rev 1.107 only checks the first psection of the ELF 8171.51Ssimonb executable, which may not be loadable. A more correct 8181.51Ssimonb fix is to check the first loadable psection instead of 8191.51Ssimonb just the first psection. 8201.51Ssimonb kcah 8211.54She 8221.85Smartin hack mips-duplicate-ras-end-label 8231.85Smartin cdate Sat Sep 2 23:29:42 2006 8241.85Smartin who martin 8251.92Schs file src/regress/sys/kern/ras/ras3/Makefile : 1.3 8261.85Smartin descr 8271.85Smartin Add -fno-reorder-blocks to CFLAGS to avoid duplicate 8281.85Smartin labels by duplicated __asm output from RAS_END() 8291.85Smartin macro. 8301.85Smartin kcah 8311.85Smartin 8321.106Slukem hack mips-mcount-assembler-warning 8331.106Slukem cdate Tue Jul 29 14:16:52 UTC 2008 8341.106Slukem who lukem 8351.106Slukem file src/lib/libc/gmon/Makefile.inc : 1.8 8361.106Slukem descr 8371.106Slukem Workaround for PR port-mips/39192. 8381.106Slukem common/lib/libc/gmon/mcount.c generates a (fatal) 8391.106Slukem assembler warning on MIPS: 8401.106Slukem Warning: No .cprestore pseudo-op used in PIC code 8411.106Slukem Add COPTS.count.c+=-Wa,--no-warn to avoid -Wa,--fatal-warnings 8421.106Slukem kcah 8431.106Slukem 8441.82Schristosport i386 8451.82Schristos 8461.84Sdrochner hack use volatile intermediate variable to enforce rounding 8471.84Sdrochner cdate Tue Aug 1 22:15:55 MEST 2006 8481.84Sdrochner who drochner 8491.84Sdrochner file src/lib/libm/src/lrintf.c : 1.4 8501.84Sdrochner file src/lib/libm/src/s_rintf.c : 1.8 8511.84Sdrochner descr 8521.84Sdrochner gcc-4 does subsequent operations on "float" values within 8531.84Sdrochner the i387 FPU without rounding the intermediate results 8541.84Sdrochner kcah 8551.110Smacallan 8561.148Schristosport x86 8571.148Schristos hack turn off optimization for biosdisk_ll.c because otherwise 8581.148Schristos we are pass the wrong arguments to biosdisk_read(). 8591.148Schristos $ cd /usr/src/sys/arch/i386/floppies/bootflopp-com 8601.148Schristos $ qemu-system-i386 -nographic -fda boot-com1.fs -boot a 8611.148Schristos who christos 8621.148Schristos file src/sys/arch/i386/stand/lib/Makefile : 1.38 8631.148Schristos descr 8641.148Schristos Turning on DISK_DEBUG shows the problem. We should find 8651.148Schristos out which option is causing this. 8661.148Schristos hcah 8671.148Schristos 8681.110Smacallanport powerpc 8691.110Smacallan 8701.110Smacallan hack avoid using __builtin_return_address(0) because it fails in 8711.110Smacallan Xorg's module loader 8721.110Smacallan cdate Sat Sep 27 03:52:05 UTC 2008 8731.110Smacallan who macallan 8741.110Smacallan file src/libexec/ld.elf_so/rtld.c : 1.121 8751.110Smacallan descr 8761.110Smacallan workaround for PR port-macppc/37812 8771.110Smacallan kcah 8781.110Smacallan 8791.115Smatt hack define TARGET_SECURE_PLT and HAVE_AS_TLS because when 8801.115Smatt building the native compiler via build.sh those don't defined 8811.115Smatt properly. 8821.115Smatt cdate Sat Mar 12 08:00:00 UTC 2011 8831.115Smatt who matt 8841.115Smatt file src/gnu/dist/gcc4/gcc/config/rs6000/netbsd.h 8851.115Smatt descr 8861.115Smatt see above 8871.115Smatt kcah 8881.117Schristos 8891.117Schristosport powerpc64 8901.117Schristos 8911.117Schristos hack include _errno.c in libposix so that __errno resolves. It 8921.117Schristos should resolve from libc's errno, but somehow it does not. 8931.117Schristos Linker bug? 8941.117Schristos cdate Thu Oct 27 13:19:47 EDT 2011 8951.117Schristos who christos 8961.117Schristos file src/lib/libposix/Makefile: 1.15 8971.118Schristos file src/lib/librt/Makefile: 1.14 8981.117Schristos descr 8991.117Schristos workaround for: 9001.117Schristos libposix_pic.a(cerror.pico)(.text+0x14): unresolvable \ 9011.117Schristos R_PPC64_REL24 relocation against symbol `.__errno' 9021.117Schristos kcah 9031.119Schristos 9041.119Schristos hack rename data() function in mdocml to avoid redefined error. 9051.119Schristos Compiler/Assembler bug? 9061.119Schristos cdate Sat Oct 29 11:16:01 EDT 2011 9071.119Schristos who christos 9081.119Schristos file src/external/bsd/mdocml/tbl_data.c: 1.2 9091.119Schristos descr 9101.119Schristos workaround for: 9111.119Schristos {standard input}: Assembler messages: 9121.119Schristos {standard input}:105: Error: symbol `.data' is already \ 9131.119Schristos defined 9141.119Schristos kcah 9151.120Schristos 9161.120Schristosport emips 9171.120Schristos 9181.120Schristos hack Add nop between ctc1 and mtc0 to avoid assembler internal 9191.120Schristos error 9201.120Schristos cdate Sat Oct 29 16:57:34 EDT 2011 9211.120Schristos who christos 9221.120Schristos file src/sys/arch/mips/mips/mips_fpu.c: 1.7 9231.120Schristos descr 9241.120Schristos workaround for: 9251.120Schristos {standard input}: Assembler messages: 9261.120Schristos {standard input}:730: Internal error! 9271.120Schristos Assertion failure in append_insn at /usr/src/external/gpl3/\ 9281.120Schristos binutils/dist/gas/config/tc-mips.c line 2910. 9291.120Schristos kcah 9301.125Smartin 9311.125Smartinport ia64 9321.125Smartin 9331.125Smartin hack libc hesiod.c file does not compile with -O2 (internal 9341.125Smartin compiler error in gcc 4.5.3) 9351.125Smartin cdate Thu Dec 27 08:05:43 CET 2012 9361.125Smartin who martin 9371.125Smartin file src/lib/libc/net/Makefile.inc: 1.82 9381.125Smartin descr 9391.125Smartin workaround for: 9401.125Smartin {standard input}: Assembler messages: 9411.125Smartin {standard input}:1507: Warning: Use of 'mov' may violate WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 15 9421.125Smartin {standard input}:1506: Warning: This is the location of the conflicting usage 9431.125Smartin {standard input}: Error: 2 warnings, treating warnings as errors 9441.125Smartin kcah 9451.125Smartin 9461.126Smartin hack libelf libelf_extended.c compiler error in gcc 4.5.3 9471.126Smartin cdate Thu Dec 27 09:05:51 CET 2012 9481.126Smartin who martin 9491.126Smartin file src/external/bsd/libelf/lib/Makefile: 1.3 9501.126Smartin descr 9511.126Smartin workaround for: 9521.126Smartin {standard input}: Assembler messages: 9531.126Smartin {standard input}:87: Warning: Use of 'adds' may violate RAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 33 9541.126Smartin {standard input}:87: Warning: Only the first path encountering the conflict is reported 9551.126Smartin {standard input}:85: Warning: This is the location of the conflicting usage 9561.126Smartin kcah 9571.126Smartin 9581.127Smartin hack compiler error with gcc 4.5.x 9591.127Smartin cdate Thu Dec 27 15:15:25 CET 2012 9601.127Smartin who martin 9611.127Smartin file src/crypto/external/bsd/netpgp/lib/verify/Makefile: 1.5 9621.127Smartin descr 9631.127Smartin workaround for: 9641.127Smartin {standard input}: Assembler messages: 9651.127Smartin {standard input}:22979: Warning: Use of 'mov' may violate WAW dependency 'GR%, % in 1 - 127' (impliedf), specific resource number is 8 9661.127Smartin {standard input}:22978: Warning: This is the location of the conflicting usage 9671.127Smartin kcah 9681.127Smartin 9691.157Smartin hack libgcc unwind dummy function 9701.157Smartin cdate Fri Apr 17 14:31:03 CEST 2015 9711.157Smartin who martin 9721.157Smartin file src/external/gpl3/gcc/dist/libgcc/config/ia64/unwind-ia64.c: 1.4 9731.157Smartin descr 9741.157Smartin Add an empty _Unwind_FindTableEntry() implementation. 9751.157Smartin In the end we will use our libc stuff, and this should 9761.157Smartin go away again. 9771.157Smartin kcah 9781.157Smartin 9791.128Schristosport x68k 9801.127Smartin 9811.128Schristos hack compiler error with gcc 4.5.x 9821.128Schristos cdate Fri May 24 13:23:01 EDT 2013 9831.128Schristos who christos 9841.128Schristos file src/external/gpl3/gcc/usr.bin/bakend/Makefile: 1.17 9851.128Schristos xsrc/external/mit/xorg/lib/libGLU/Makefile: 1.11 9861.128Schristos descr 9871.128Schristos workaround for: 9881.128Schristos internal compiler error: in cselib_record_set, at cselib.c:1999 9891.128Schristos kcah 9901.130Sjoerg 9911.130Sjoerghack fallback to /usr/bin/clang-cpp in rpcgen 9921.130Sjoergcdate Wed Jun 5 15:49:27 CEST 2013 9931.130Sjoergwho joerg 9941.130Sjoergfile src/usr.bin/rpcgen/rpc_main.c 9951.130Sjoergdescr 9961.136Sjoerg It is undecided which compiler owns /usr/bin/cpp and whether it should 9971.130Sjoerg exist in a MKGCC=no world. To allow rpcgen to work out-of-the-box, 9981.130Sjoerg if either gcc or clang is installed, use /usr/bin/clang-cpp as fallback. 9991.130Sjoerg This applies only if RPCGEN_CPP is not set and /usr/bin/cpp is not executable. 10001.130Sjoergkcah 10011.131Sskrll 10021.155Sskrllport hppa 10031.131Sskrll 10041.131Sskrll hack compiler error with gcc 4.5.x 10051.131Sskrll cdate Tue Jul 23 07:42:28 BST 2013 10061.131Sskrll who skrll 10071.133Sskrll file src/sys/lib/libkern/Makefile.libkern: 1.26 10081.133Sskrll descr 10091.133Sskrll workaround for unanalysed codegen bug affecting md5c.c. 10101.133Sskrll kcah 10111.149Smacallan 10121.155Sskrll hack gdb vs _rtld_debug_state problem 10131.155Sskrll cdate Thu Mar 5 09:49:53 UTC 2015 10141.155Sskrll who skrll 10151.155Sskrll file src/libexec/ld.elf_so/rtld.c: 1.175 10161.155Sskrll descr 10171.155Sskrll workaround for problem where gdb misses the breakpoint on 10181.155Sskrll _rtld_debug_state when the function is only the 10191.155Sskrll bv,n %r0(%rp) instruction - the nullify seems to 10201.155Sskrll confuse something 10211.155Sskrll kcah 10221.155Sskrll 10231.149Smacallanport mips64* 10241.149Smacallanhack compiler crashes on mips64* with optimization enabled 10251.149Smacallancdate Tue May 13 18:46:48 UTC 2014 10261.149Smacallanwho macallan 10271.149Smacallanfile src/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/Makefile.inc: 1.6 10281.149Smacallan src/external/lgpl3/gmp/lib/libgmp/arch/mips64eb/config.h: 1.5 10291.149Smacallan src/external/lgpl3/gmp/lib/libgmp/arch/mips64el/Makefile.inc: 1.6 10301.149Smacallan src/external/lgpl3/gmp/lib/libgmp/arch/mips64el/config.h: 1.5 10311.149Smacallandescr workaround for n32 gcc doing unaligned 64bit accesses when optimizing 10321.149Smacallanpr 48696 10331.149Smacallankcah 10341.150Smartin 10351.150Smartinport vax 10361.150Smartinhack compile boot with -O1 10371.150Smartincdate Sat May 24 09:40:58 CEST 2014 10381.150Smartinwho martin 10391.150Smartinfile src/sys/arch/vax/boot/boot/Makefile: 1.41 10401.150Smartindescr /boot does not work when compiled with -O2 and gcc 4.8 10411.150Smartinkcah 10421.150Smartin 10431.156Smattport arm 10441.156Smatthack avoid using labels in a 12-bit constant. 10451.156Smattwho matt 10461.156Smattfile crypto/external/bsd/openssl/lib/libcrypto/arch/arm/aes-armv4.S: 1.2 10471.156Smattdescr workaround for clang misassembling an instruction 10481.156Smattkcah 1049