Issue Details (XML | Word | Printable)

Key: PCC-277
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Anders Magnusson
Reporter: Iain Hibbert
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
pcc

pcc MAXOPT for -D, -I, -U options is not enough

Created: 15/Mar/11 07:53 PM   Updated: 15/Mar/11 08:23 PM
Component/s: C frontend
Affects Version/s: None
Fix Version/s: None

File Attachments: 1. File diff (1 kB)

Environment: NetBSD/i386


 Description  « Hide
attempting to compile Xorg on NetBSD I discover that some of the xorg-server compilations fail with "Too many DIU options" for example

# compile os/access.pico
/usr/tools/bin/i486--netbsdelf-pcc -O2 -Werror -fno-strict-aliasing -DSHAPE -DXKB -DLBX -DXAPPGROUP -DXCSECURITY -DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPIXPRIV -DPANORAMIX -DRENDER -DRANDR -DGCCUSESGAS -DAVOID_GLYPHBLT -DSINGLEDEPTH -DXvExtension -DXFree86Server -DXvMCExtension -DSMART_SCHEDULE -DBUILDDEBUG -DXResExtension -DNDEBUG -DXINPUT -DXFreeXDGA -DXF86VIDMODE -DXORG_VERSION_CURRENT="(((1) * 10000000) + ((9) * 100000) + ((2) * 1000) + 0)" -I/var/cvs/NetBSD-current/xsrc/external/mit/xorg-server/dist/include -I/usr/X11R7/include/X11 -I/usr/X11R7/include/X11/extensions -I/usr/X11R7/include/pixman-1 -I/var/cvs/NetBSD-current/xsrc/external/mit/xorg-server/dist/Xext -I/var/cvs/NetBSD-current/xsrc/external/mit/xorg-server/dist/render -I/var/cvs/NetBSD-current/xsrc/external/mit/xorg-server/dist/lbx -I/var/cvs/NetBSD-current/xsrc/external/mit/xorg-server/dist/../include -DHAVE_DIX_CONFIG_H -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -D_POSIX_THREAD_SAFE_FUNCTIONS -DHAVE_XORG_CONFIG_H -DTCPCONN -DUNIXCONN -DHAS_STICKY_DIR_BIT -DHAS_FCHOWN -DIPv6 -DMITMISC -DXTEST -DXTRAP -DXSYNC -DXCMISC -DXRECORD -DMITSHM -DBIGREQS -DXF86VIDMODE -DXF86MISC -DDPMSExtension -DEVI -DSCREENSAVER -DXV -DXVMC -DGLXEXT -DRES -DSHAPE -DXINPUT -DXKB -DLBX -DXAPPGROUP -DXCSECURITY -DTOGCUP -DXF86BIGFONT -DDPMSExtension -DPIXPRIV -DPANORAMIX -DRENDER -DRANDR -DXFIXES -DDAMAGE -DCOMPOSITE -DXEVIE -DGLXEXT -DXF86DRI -DGLX_DIRECT_RENDERING -DGLX_USE_DLOPEN -DGLX_USE_MESA -DXF86VIDMODE -DHASXDMAUTH -DDDXOSINIT -DSERVER_LOCK -DDDXOSFATALERROR -DDDXOSVERRORF -DDDXTIME -DUSB_HID -DUSE_RGB_TXT -UDDXTIME -DHAVE_SHA1_IN_LIBC -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO -I/usr/X11R7/include -nostdinc -isystem /usr/include -c -Wno-error -fPIC -DPIC /var/cvs/NetBSD-current/xsrc/external/mit/xorg-server/dist/os/access.c -o access.pico
Too many DIU options

This is because the MAXOPT for storing these is defined at 100 (in pcc/cc/cc.c). The failures I observed were only slightly over the limit, and bumping the value to 200 is enough to remove all known failures.

The patch attached additionally moves the list out of the stack and into the bss section

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Anders Magnusson added a comment - 15/Mar/11 08:23 PM
Fixed, but by just wrapping up MAXOPT to 200. cc should be rewritten to avoid these static tables after 1.0.