# GCC 4.8 switch from GCC 4.2.1 (not for ports)



## StrikerASD (Dec 27, 2012)

Hello,

I have a problem. I've installed GCC48 from ports and edited make.conf and libmap.conf files just as described in this section: http://www.freebsd.org/doc/en/articles/custom-gcc/configuring-ports-gcc.html

Unfortunately, it is only for the ports, and I don't need GCC 4.8 for ports. I have downloaded wine sources from http://winehq.org and I want to compile it for FreeBSD x86_64.
So I type `# ./configure --enable-win64` and there is the problem:

```
checking build system type... x86_64-unknown-freebsd9.0
checking host system type... x86_64-unknown-freebsd9.0
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for cpp... cpp
checking whether gcc supports __builtin_ms_va_list... no
configure: error: You need gcc >= 4.4 to build Wine as 64-bit.

[iwo@bsd ~/wine64/wine-1.5.20]$ gcc -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]
```
Now the question: How do I make wine to configure and compile under GCC 4.8? What I need to change? And yes, I have 64-bit FreeBSD

```
dmesg | head
Copyright (c) 1992-2012 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012
    [email]root@amd64-builder.daemonology.net[/email]:/usr/obj/usr/src/sys/GENERIC amd64
CPU: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz (2400.02-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x6fb  Family = 6  Model = f  Stepping = 11
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0xe3bd<SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM>
```


----------



## StrikerASD (Dec 27, 2012)

Sorry, I type `# ./configure --enable-win64`


----------



## kpa (Dec 27, 2012)

See if the configure works with this:

`$ env CC=gcc48 CXX=g++48 CPP="gcc48 -E" ./configure --enable-win64`

Use the same env(1) prefix for the rest of the compilation or set the variables in environment if that works.


----------



## StrikerASD (Dec 28, 2012)

Thank you for quick answer. This solved the problem


----------

