HACKS revision 1.110
11.110Smacallan# $NetBSD: HACKS,v 1.110 2008/09/27 03:57:37 macallan 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.105Sagchack cross-building hack on Darwin 2841.105Sagcmdate 20 July 2008 2851.105Sagcwho agc 2861.105Sagcfile src/distrib/common/Makefile.mdset : 1.33 2871.105Sagcdescr 2881.105Sagc Darwin has problems with getopt() when used in mdsetimage -v, 2891.105Sagc due to the difference between BSD and libiberty() getopt 2901.105Sagc implementations, more fully described in 2911.105Sagc http://mail-index.netbsd.org/current-users/2008/06/27/msg003242.html 2921.105Sagc and the subsequent thread. For just now, we just have an ugly 2931.105Sagc workaround not to call mdsetimage with the -v argument on Darwin 2941.105Sagckcah 2951.105Sagc 2961.109Sveegohack avoid rebuilding asn1 libraries 2971.109Sveegomdate 03 August 2008 2981.109Sveegowho veego 2991.109Sveegofile src/crypto/dist/heimdal/lib/asn1/gen.c : 1.10 3001.109Sveegofile src/lib/libasn1/Makefile : 1.32 3011.109Sveegofile src/lib/libhdb/Makefile : 1.23 3021.109Sveegofile src/lib/libgssapi/Makefile : 1.20 3031.109Sveegofile src/lib/libhx509/Makefile : 1.3 3041.109Sveegopr 9702 39185 3051.109Sveegodescr 3061.109Sveego asn1_compile does not check if generated header files do not have to 3071.109Sveego be rebuild. 3081.109Sveego Generate .hx files and copy it in the Makefiles if they changed. 3091.109Sveegokcah 3101.109Sveego 3111.21Smycroftport vax 3121.21Smycroft 3131.102Stsutsui hack gcc4/vax ICE 3141.102Stsutsui cdate 3151.102Stsutsui who tsutsui 3161.102Stsutsui file sys/arch/vax/conf/Makefile.vax 3171.102Stsutsui descr 3181.102Stsutsui GCC4 on vax gets ICE on compiling sys/ddb/db_command.c. 3191.102Stsutsui -fno-tree-ter prevents it so add it to COPTS. 3201.102Stsutsui kcah 3211.102Stsutsui 3221.81Smrg hack gcc4/vax compiler crash 3231.81Smrg cdate Fri Jun 30 22:39:12 PDT 2006 3241.81Smrg who mrg 3251.81Smrg file bin/csh/Makefile : 1.27 3261.81Smrg file lib/i18n_module/UTF7/Makefile : 1.2 3271.81Smrg descr 3281.81Smrg GCC4 on vax crashes. -O0 stops it happening so far... 3291.81Smrg kcah 3301.81Smrg 3311.52Sjmc hack gcc 2.95/vax doesn't like abort being used as function pointer 3321.52Sjmc cdate Tue Dec 13 05:54:50 GMT 2005 3331.52Sjmc who jmc 3341.52Sjmc file lib/libc/rpc/svc_vc.c 1.15 3351.52Sjmc descr 3361.52Sjmc Provide a local definition for abort which doesn't include 3371.52Sjmc the noreturn attribute which trips up gcc 2.95 on vax. 3381.81Smrg kcah 3391.52Sjmc 3401.45Sjmc hack gcc 2.95/vax doesn't have stdbool.h and gettext needs it 3411.45Sjmc cdate Mon May 9 12:16:22 CDT 2005 3421.45Sjmc who jmc 3431.45Sjmc file gnu/usr.bin/gettext/Makefile.inc.prog 1.5 3441.45Sjmc gnu/usr.bin/gettext/libgrep/Makefile 1.3 3451.45Sjmc gnu/usr.bin/gettext/libnlspr/Makefile 1.5 3461.45Sjmc gnu/usr.bin/gettext/libnlsut/Makefile 1.3 3471.45Sjmc descr 3481.45Sjmc The latest gettext assumes a C99 environment or at least 3491.45Sjmc configure checks to work around this. As we don't use configure 3501.45Sjmc provide a stdbool.h for vax builds locally in directories from 3511.45Sjmc the template provided by the gettext code. 3521.81Smrg kcah 3531.45Sjmc 3541.21Smycroft hack gcc 2.95/vax cannot handle __builtin_ffs() 3551.21Smycroft cdate Fri Aug 23 21:31:15 CEST 2002 3561.21Smycroft who ragge 3571.21Smycroft file sys/lib/libkern/libkern.h : 1.42 3581.21Smycroft descr 3591.21Smycroft __builtin_ffs() is ifdef'd away if __vax__. Matt Thomas has 3601.21Smycroft added this feature to GCC 3 so it can be removed when switching. 3611.81Smrg kcah 3621.21Smycroft 3631.102Stsutsui hack gcc 2.95/vax libbz2 3641.21Smycroft mdate 27 Jun 2002 3651.21Smycroft who thorpej 3661.21Smycroft file lib/libbz2/Makefile 3671.21Smycroft descr 3681.21Smycroft libbz2 is mis-compiled with optimization with GCC 2.95.3 3691.24Sragge on VAX. -O0 works around this problem. 3701.24Sragge kcah 3711.24Sragge 3721.21Smycroft hack vax Toolchain bug 3731.21Smycroft cdate 28 Mar 2003 3741.21Smycroft who he 3751.21Smycroft file sys/arch/vax/vax/intvec.S : 1.5 3761.21Smycroft descr 3771.21Smycroft Workaround for PR toolchain/20924. The assembler apparently 3781.21Smycroft tries to range-check byte offsets when it doesn't have 3791.21Smycroft sufficient information to make that decision. 3801.21Smycroft Workaround uses `brw' instead of `brb' instruction. 3811.23She kcah 3821.23She 3831.23She hack vax gcc 2.95.3 -Wuninitialized workarounds 3841.23She cdate 6 Nov 2003 3851.23She who he 3861.23She file sys/dev/bi/if_ni.c : 1.22 3871.23She file sys/arch/vax/vax/ctu.c : 1.20 3881.23She descr 3891.23She Workaround for gcc 2.95.3 failing to detect that certain 3901.23She variables will be initialized; so that this code compiles 3911.23She with -Wuninitialized. Should be reviewed and possibly 3921.23She reverted when gcc 3.3.2 is ready for vax. 3931.21Smycroft kcah 3941.21Smycroft 3951.34Scl hack vax gcc 2.95.3 structure initialization 3961.34Scl cdat 13 May 2004 3971.34Scl who cl 3981.34Scl file sys/miscfs/kernfs/kernfs_vnops.c : 1.104 3991.34Scl descr 4001.34Scl Workaround for gcc 2.95.3 failing to initialize structures 4011.34Scl and/or unions inside structures using nested designators. 4021.34Scl Should be reverted when gcc >=3.3.3 is ready for vax. 4031.34Scl kcah 4041.21Smycroft 4051.35She hack vax gcc 2.95.3 needs -I. to build nslexer.c 4061.35She cdat 6 Jun 2004 4071.36She who mhitch 4081.36She file lib/libc/arch/vax/Makefile.inc : 1.6 4091.35She descr 4101.35She It appears necessary to add -I. to CPPFLAGS when building 4111.35She nslesxer.c. This may be caused by gcc 2.95.3 being used. 4121.35She Should be reverted when a newer gcc is ready for vax. 4131.35She kcah 4141.35She 4151.43Stron hack vax gcc 2.95.3 doesn't understand "-std=c99" 4161.43Stron cdat 5 April 2005 4171.43Stron who tron 4181.43Stron file src/share/mk/bsd.sys.mk 4191.43Stron descr 4201.43Stron We cannot use "-std=c99" for compiler warning level 4 and above 4211.43Stron because gcc 2.95.3 doesn't support that option. 4221.43Stron kcah 4231.43Stron 4241.54She hack declare boolean_t in two IPF user-mode programs 4251.54She cdate Tue Mar 7 19:19:20 CET 2006 4261.54She who he 4271.54She file dist/ipf/ipsend/iptests.c : 1.8 4281.54She dist/ipf/ipsend/sock.c : 1.7 4291.54She descr 4301.54She The IPF user-mode programs ipsend and iptest first 4311.54She include <sys/types.h> without _KERNEL defined, and 4321.54She later include <sys/file.h> with _KERNEL defined. 4331.54She This causes a build failure when building for vax, 4341.54She since <sys/device.h> ends up being included without 4351.54She bollean_t being defined by <sys/types.h>. 4361.54She Build failure and further details documented in 4371.54She PR#32907. 4381.54She kcah 4391.54She 4401.104Sgmcgarry hack pcc 0.9.9 large string literals 4411.104Sgmcgarry cdat 8 July 2008 4421.104Sgmcgarry who gmcgarry 4431.104Sgmcgarry file sys/conf/param.c : 1.58 4441.104Sgmcgarry descr 4451.104Sgmcgarry Workaround for pcc 0.9.9 not handling large string literals 4461.104Sgmcgarry which causes kernels with 'options INCLUDE_CONFIG_FILE' to 4471.104Sgmcgarry fail compilation. 4481.104Sgmcgarry There is a proposal on the pcc mailing list to stuff config 4491.104Sgmcgarry file in ELF section. 4501.104Sgmcgarry kcah 4511.104Sgmcgarry 4521.107Smrg hack xorg warnings 4531.107Smrg cdat 30 July 2008 4541.107Smrg who mrg 4551.108Smrg file external/mit/xorg/lib/libSM/Makefile : 1.2 4561.107Smrg external/mit/xorg/lib/libX11/Makefile.libx11 : 1.2 4571.107Smrg external/mit/xorg/lib/libXext/Makefile : 1.2 4581.107Smrg external/mit/xorg/lib/libXfont/Makefile : 1.2 4591.107Smrg descr 4601.107Smrg Disable several warnings or use -Wno-error across Xorg sources 4611.107Smrg while we get them working 4621.107Smrg kcah 4631.107Smrg 4641.21Smycroftport arm 4651.21Smycroft 4661.21Smycroft hack gcc-unsigned-compare 4671.21Smycroft cdate 09 Mar 2002 4681.21Smycroft mdate 18 Mar 2002 4691.21Smycroft who bjh21 4701.21Smycroft file dist/bind/lib/nameser/ns_parse.c : 1.3 4711.21Smycroft file dist/dhcp/minires/ns_parse.c : 1.3 4721.21Smycroft file dist/dhcp/omapip/result.c : 1.2 4731.21Smycroft file dist/dhcp/server/failover.c : 1.3 4741.21Smycroft file gnu/dist/toolchain/bfd/bfd.c : 1.2 4751.21Smycroft file gnu/dist/toolchain/bfd/format.c : 1.2 4761.21Smycroft file gnu/dist/toolchain/gdb/target.c : 1.2 4771.21Smycroft file sys/kern/vfs_subr.c : 1.172 4781.21Smycroft descr When checking that a potentially-unsigned enum is >= 0, assign 4791.21Smycroft it to an int first. This is necessary to avoid "comparison is 4801.21Smycroft always true" warnings with -fshort-enums. Casting to an int 4811.21Smycroft really should be enough, but turns out not to be. 4821.21Smycroft kcah 4831.21Smycroft 4841.21Smycroft 4851.21Smycroftport sh3 4861.21Smycroft 4871.74Smrg hack gcc4-sh3-bz2 4881.103Stsutsui cdate Sun May 21 03:34:57 UTC 2006 4891.103Stsutsui mdate Fri May 16 13:13:00 UTC 2008 4901.103Stsutsui who mrg, tsutsui 4911.74Smrg file lib/libbz2/Makefile : 1.10 4921.74Smrg descr 4931.74Smrg The in-tree GCC 4.1-based compiler generated too-far 4941.103Stsutsui pc-relative addresses. Hack is to build with 4951.103Stsutsui -fno-loop-optimize. 4961.74Smrg kcah 4971.74Smrg 4981.21Smycroft 4991.96Smrgport m68000 5001.79Smrg 5011.96Smrg hack gcc4-m68000 5021.102Stsutsui cdate Fri Feb 8 10:29:37 PST 2008 5031.102Stsutsui mdate Sun May 4 15:37:19 UTC 2008 5041.99Stsutsui who mrg, tsutsui 5051.96Smrg file rescue/Makefile : 1.21 5061.99Stsutsui file sbin/dump_lfs/Makefile : 1.9 5071.101Stsutsui file sbin/fsck_ffs/Makefile : 1.35 5081.101Stsutsui file sbin/fsdb/Makefile : 1.22 5091.101Stsutsui file share/mk/sys.mk : 1.96 5101.99Stsutsui file usr.sbin/ndbootd/Makefile : 1.5 5111.95Smrg descr 5121.101Stsutsui Several internal compiler errors with gcc -O1 5131.101Stsutsui around 64bit integer arithmetic. 5141.99Stsutsui This hack uses -O1 and adds some -fno-tree-foo options 5151.99Stsutsui to avoid the problem. 5161.101Stsutsui This might be related with GCC Bugzilla Bug 32424. 5171.95Smrg kcah 5181.95Smrg 5191.22Smrg 5201.31Smartinport sparc64 5211.31Smartin 5221.31Smartin hack disable optimzations for uvm_bio.c on 32 bit kernels 5231.31Smartin cdate Sun Mar 21 14:14:04 MET 2004 5241.31Smartin who martin 5251.32Smartin file sys/arch/sparc64/conf/Makefile.sparc64 : 1.53-1.54 5261.32Smartin file sys/arch/sparc64/conf/files.sparc64 : 1.93 5271.31Smartin descr 5281.31Smartin The sparc compiler miscompiles uvm_bio.c when using 5291.31Smartin any optimization. This results in ubc_release panics. 5301.31Smartin kcah 5311.42Schristos 5321.51Ssimonbport mips 5331.51Ssimonb 5341.51Ssimonb hack mips-shared-linker-load-address 5351.51Ssimonb cdate Fri Oct 7 08:33:10 UTC 2005 5361.51Ssimonb who simonb 5371.51Ssimonb file src/sys/kern/exec_elf32.c : 1.107 5381.51Ssimonb descr 5391.51Ssimonb With COMPAT_16 or previous enabled (which enables 5401.51Ssimonb ELF_INTERP_NON_RELOCATABLE) a recent ld.elf_so will 5411.51Ssimonb load and run at address 0. The check to fix this in 5421.51Ssimonb rev 1.107 only checks the first psection of the ELF 5431.51Ssimonb executable, which may not be loadable. A more correct 5441.51Ssimonb fix is to check the first loadable psection instead of 5451.51Ssimonb just the first psection. 5461.51Ssimonb kcah 5471.54She 5481.85Smartin hack mips-duplicate-ras-end-label 5491.85Smartin cdate Sat Sep 2 23:29:42 2006 5501.85Smartin who martin 5511.92Schs file src/regress/sys/kern/ras/ras3/Makefile : 1.3 5521.85Smartin descr 5531.85Smartin Add -fno-reorder-blocks to CFLAGS to avoid duplicate 5541.85Smartin labels by duplicated __asm output from RAS_END() 5551.85Smartin macro. 5561.85Smartin kcah 5571.85Smartin 5581.106Slukem hack mips-mcount-assembler-warning 5591.106Slukem cdate Tue Jul 29 14:16:52 UTC 2008 5601.106Slukem who lukem 5611.106Slukem file src/lib/libc/gmon/Makefile.inc : 1.8 5621.106Slukem descr 5631.106Slukem Workaround for PR port-mips/39192. 5641.106Slukem common/lib/libc/gmon/mcount.c generates a (fatal) 5651.106Slukem assembler warning on MIPS: 5661.106Slukem Warning: No .cprestore pseudo-op used in PIC code 5671.106Slukem Add COPTS.count.c+=-Wa,--no-warn to avoid -Wa,--fatal-warnings 5681.106Slukem kcah 5691.106Slukem 5701.82Schristosport i386 5711.82Schristos 5721.84Sdrochner hack use volatile intermediate variable to enforce rounding 5731.84Sdrochner cdate Tue Aug 1 22:15:55 MEST 2006 5741.84Sdrochner who drochner 5751.84Sdrochner file src/lib/libm/src/lrintf.c : 1.4 5761.84Sdrochner file src/lib/libm/src/s_rintf.c : 1.8 5771.84Sdrochner descr 5781.84Sdrochner gcc-4 does subsequent operations on "float" values within 5791.84Sdrochner the i387 FPU without rounding the intermediate results 5801.84Sdrochner kcah 5811.110Smacallan 5821.110Smacallanport powerpc 5831.110Smacallan 5841.110Smacallan hack avoid using __builtin_return_address(0) because it fails in 5851.110Smacallan Xorg's module loader 5861.110Smacallan cdate Sat Sep 27 03:52:05 UTC 2008 5871.110Smacallan who macallan 5881.110Smacallan file src/libexec/ld.elf_so/rtld.c : 1.121 5891.110Smacallan descr 5901.110Smacallan workaround for PR port-macppc/37812 5911.110Smacallan kcah 5921.110Smacallan 593