| Summary: | Buildkernel is broken with 'options CPU_DISABLE_SSE' in kernel conf file | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Sergey Gluschenko <deen> |
| Component: | i386 | Assignee: | freebsd-i386 (Nobody) <i386> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 6.0-BETA1 | ||
| Hardware: | Any | ||
| OS: | Any | ||
Sergey Gluschenko wrote:
>>Environment:
>
> FreeBSD xlab.hostel 6.0-BETA1 FreeBSD 6.0-BETA1 #2: Thu Jul 21 23:49:49 EEST 200 5 deen@xlab.hostel:/usr/obj/usr/src/sys/X i386
>
>>Description:
>
> Buildkernel is broken with 'options CPU_DISABLE_SSE' in kernel conf file. Here is the error:
> linking kernel.debug
> ptrace_machdep.o(.text+0x17): In function `cpu_ptrace':
> /usr/src/sys/i386/i386/ptrace_machdep.c:48: undefined reference to `cpu_fxsr'
> [...]
This should not happen... obviously. ;-) Delete the directory
/usr/obj/usr/src/sys/X and try again.
Björn
According to this patch: http://freebsd.rambler.ru/bsdmail/freebsd-arch_2005/msg00626.html we need to clean up all CPU_ENABLE_SSE in kernel, as Ruslan said: http://freebsd.rambler.ru/bsdmail/freebsd-arch_2005/msg00627.html But we need working "options CPU_DISABLE_SSE", so I decided to replace all "#ifdef CPU_ENABLE_SSE" to "#ifndef CPU_DISABLE_SSE" and all "#if defined(CPU_ENABLE_SSE)" to "#if !defined(CPU_DISABLE_SSE)" Also, #include "opt_cpu.h" was missing in sys/i386/i386/ptrace_machdep.c After all this changes the reported problem is gone. Here the patches: http://xlab.users.sevsky.net/freebsd/sys_i386_i386_initcpu.c.diff http://xlab.users.sevsky.net/freebsd/sys_i386_i386_machdep.c.diff http://xlab.users.sevsky.net/freebsd/sys_i386_i386_pmap.c.diff http://xlab.users.sevsky.net/freebsd/sys_i386_i386_ptrace_machdep.c.diff http://xlab.users.sevsky.net/freebsd/sys_i386_isa_npx.c.diff http://xlab.users.sevsky.net/freebsd/sys_i386_linux_linux_ptrace.c.diff (not tested!) http://xlab.users.sevsky.net/freebsd/sys_pc98_pc98_machdep.c.diff (not tested!) -- Sergey Gluschenko State Changed From-To: open->closed A simpler fix obtained from the originator via IRC committed in HEAD, thanks! |
Buildkernel is broken with 'options CPU_DISABLE_SSE' in kernel conf file. Here is the error: linking kernel.debug ptrace_machdep.o(.text+0x17): In function `cpu_ptrace': /usr/src/sys/i386/i386/ptrace_machdep.c:48: undefined reference to `cpu_fxsr' *** Error code 1 Stop in /usr/obj/usr/src/sys/X. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. Here is the conf file: machine i386 cpu I686_CPU ident X # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions NO_MODULES=yes options CPU_PPRO2CELERON options CPU_L2_LATENCY=4 options CPU_FASTER_5X86_FPU options CPU_UPGRADE_HW_CACHE options CPU_DISABLE_SSE options TCP_DROP_SYNFIN #drop TCP packets with SYN+FIN options IPFIREWALL #firewall options IPFIREWALL_VERBOSE #enable logging to syslogd(8) options IPFIREWALL_VERBOSE_LIMIT=100 #limit verbosity options IPFIREWALL_DEFAULT_TO_ACCEPT #allow everything by default options IPFIREWALL_FORWARD #packet destination changes options IPFIREWALL_FORWARD_EXTENDED #all packet dest changes options IPDIVERT options SCHED_ULE # ULE scheduler #options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options MD_ROOT # MD is a potential root device options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_GPT # GUID Partition Tables. options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options AHC_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~128k to driver. options AHD_REG_PRETTY_PRINT # Print register bitfields in debug # output. Adds ~215k to driver. options ADAPTIVE_GIANT # Giant mutex is adaptive. # Debugging for use in -current options KDB # Enable kernel debugger support. options DDB # Support DDB. #options GDB # Support remote GDB. #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed # Bus support. Do not remove isa, even if you have no isa slots device isa device eisa device pci # Floppy drives device fdc # ATA and ATAPI devices device ata device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives options ATA_STATIC_ID # Static device numbering # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device vga # VGA video card driver # syscons is the default console driver, resembling an SCO console device sc # Floating point support - do not disable. device npx # Power management support (see NOTES for more options) #device apm # Add suspend/resume support for the i8254. device pmtimer # Serial (COM) ports device sio # 8250, 16[45]50 based serial ports # Parallel port device ppc device ppbus # Parallel port bus (required) device lpt # Printer device plip # TCP/IP over parallel device ppi # Parallel port interface device #device vpo # Requires scbus and da device miibus # MII bus support device rl # RealTek 8129/8139 # Pseudo devices. device loop # Network loopback device mem # Memory and kernel memory devices device io # I/O device device random # Entropy device device ether # Ethernet support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif # IPv6 and IPv4 tunneling # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter