@@ -88,7 +88,7 @@ The ports required and their locations are as follows:
For compiling and using the DPDK with gcc, the compiler must be installed
from the ports collection:
-* gcc: version 4.8 is recommended ``/usr/ports/lang/gcc48``.
+* gcc: version 4.9 is recommended ``/usr/ports/lang/gcc49``.
Ensure that ``CPU_OPTS`` is selected (default is OFF).
When running the make config-recursive command, a dialog may be presented to the
@@ -168,7 +168,7 @@ For example to compile for FreeBSD use:
If the compiler binary to be used does not correspond to that given in the
TOOLCHAIN part of the target, the compiler command may need to be explicitly
specified. For example, if compiling for gcc, where the gcc binary is called
- gcc4.8, the command would need to be ``gmake install T=<target> CC=gcc4.8``.
+ gcc4.9, the command would need to be ``gmake install T=<target> CC=gcc4.9``.
Browsing the Installed DPDK Environment Target
----------------------------------------------
@@ -54,7 +54,7 @@ the following variables must be exported:
The following is an example of creating the ``helloworld`` application, which runs
in the DPDK FreeBSD environment. While the example demonstrates compiling
-using gcc version 4.8, compiling with clang will be similar, except that the ``CC=``
+using gcc version 4.9, compiling with clang will be similar, except that the ``CC=``
parameter can probably be omitted. The ``helloworld`` example may be found in the
``${RTE_SDK}/examples`` directory.
@@ -72,7 +72,7 @@ in the build directory.
setenv RTE_SDK $HOME/DPDK
setenv RTE_TARGET x86_64-native-bsdapp-gcc
- gmake CC=gcc48
+ gmake CC=gcc49
CC main.o
LD helloworld
INSTALL-APP helloworld
@@ -96,7 +96,7 @@ in the build directory.
cd my_rte_app/
setenv RTE_TARGET x86_64-native-bsdapp-gcc
- gmake CC=gcc48
+ gmake CC=gcc49
CC main.o
LD helloworld
INSTALL-APP helloworld
@@ -61,8 +61,8 @@ Compilation of the DPDK
* coreutils: ``cmp``, ``sed``, ``grep``, ``arch``, etc.
-* gcc: versions 4.5.x or later is recommended for ``i686/x86_64``. Versions 4.8.x or later is recommended
- for ``ppc_64`` and ``x86_x32`` ABI. On some distributions, some specific compiler flags and linker flags are enabled by
+* gcc: versions 4.9 or later is recommended for all platforms.
+ On some distributions, some specific compiler flags and linker flags are enabled by
default and affect performance (``-fstack-protector``, for example). Please refer to the documentation
of your distribution and to ``gcc -dumpspecs``.
@@ -82,7 +82,7 @@ Compilation of the DPDK
.. note::
x86_x32 ABI is currently supported with distribution packages only on Ubuntu
- higher than 13.10 or recent Debian distribution. The only supported compiler is gcc 4.8+.
+ higher than 13.10 or recent Debian distribution. The only supported compiler is gcc 4.9+.
.. note::
@@ -162,7 +162,7 @@ To compile BNX2X PMD for FreeBSD x86_64 gcc target, run the following "gmake"
command::
cd <DPDK-source-directory>
- gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=/usr/local/lib/gcc48 CC=gcc48
+ gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=/usr/local/lib/gcc49 CC=gcc49
To compile BNX2X PMD for FreeBSD x86_64 gcc target, run the following "gmake"
command:
@@ -170,7 +170,7 @@ command:
.. code-block:: console
cd <DPDK-source-directory>
- gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=/usr/local/lib/gcc48 CC=gcc48
+ gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=/usr/local/lib/gcc49 CC=gcc49
Linux
-----
@@ -150,7 +150,7 @@ command::
cd <DPDK-source-directory>
gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=\
- /usr/local/lib/gcc48 CC=gcc48
+ /usr/local/lib/gcc49 CC=gcc49
Sample Application Notes
@@ -36,6 +36,11 @@ New Features
This section is a comment. Make sure to start the actual text at the margin.
+* **Added support for new gcc -march option.**
+
+ The GCC 4.9 ``-march`` option supports the Intel processor code names.
+ The config option ``RTE_MACHINE`` can be used to pass code names to the compiler as ``-march`` flag.
+
Resolved Issues
---------------
@@ -50,7 +50,11 @@
# - can define CPU_ASFLAGS variable (overriden by cmdline value) that
# overrides the one defined in arch.
#
+ifneq ($(wildcard $(RTE_SDK)/mk/machine/$(RTE_MACHINE)/rte.vars.mk),)
include $(RTE_SDK)/mk/machine/$(RTE_MACHINE)/rte.vars.mk
+else
+MACHINE_CFLAGS := -march=$(RTE_MACHINE)
+endif
#
# arch:
@@ -42,51 +42,8 @@ GCC_MAJOR = $(shell echo __GNUC__ | $(CC) -E -x c - | tail -n 1)
GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(CC) -E -x c - | tail -n 1)
GCC_VERSION = $(GCC_MAJOR)$(GCC_MINOR)
-# if GCC is older than 4.x
-ifeq ($(shell test $(GCC_VERSION) -lt 40 && echo 1), 1)
- MACHINE_CFLAGS =
-$(warning You are using GCC < 4.x. This is neither supported, nor tested.)
-
-
-else
-# GCC graceful degradation
-# GCC 4.2.x - added support for generic target
-# GCC 4.3.x - added support for core2, ssse3, sse4.1, sse4.2
-# GCC 4.4.x - added support for avx, aes, pclmul
-# GCC 4.5.x - added support for atom
-# GCC 4.6.x - added support for corei7, corei7-avx
-# GCC 4.7.x - added support for fsgsbase, rdrnd, f16c, core-avx-i, core-avx2
# GCC 4.9.x - added support for armv8-a+crc
#
- ifeq ($(shell test $(GCC_VERSION) -le 49 && echo 1), 1)
- MACHINE_CFLAGS := $(patsubst -march=armv8-a+crc,-march=armv8-a+crc -D__ARM_FEATURE_CRC32=1,$(MACHINE_CFLAGS))
- endif
- ifeq ($(shell test $(GCC_VERSION) -le 47 && echo 1), 1)
- MACHINE_CFLAGS := $(patsubst -march=core-avx-i,-march=corei7-avx,$(MACHINE_CFLAGS))
- MACHINE_CFLAGS := $(patsubst -march=core-avx2,-march=core-avx2,$(MACHINE_CFLAGS))
- endif
- ifeq ($(shell test $(GCC_VERSION) -lt 46 && echo 1), 1)
- MACHINE_CFLAGS := $(patsubst -march=corei7-avx,-march=core2 -maes -mpclmul -mavx,$(MACHINE_CFLAGS))
- MACHINE_CFLAGS := $(patsubst -march=corei7,-march=core2 -maes -mpclmul,$(MACHINE_CFLAGS))
- endif
- ifeq ($(shell test $(GCC_VERSION) -lt 45 && echo 1), 1)
- MACHINE_CFLAGS := $(patsubst -march=atom,-march=core2 -mssse3,$(MACHINE_CFLAGS))
- endif
- ifeq ($(shell test $(GCC_VERSION) -lt 44 && echo 1), 1)
- MACHINE_CFLAGS := $(filter-out -mavx -mpclmul -maes,$(MACHINE_CFLAGS))
- ifneq ($(findstring SSE4_2, $(CPUFLAGS)),)
- MACHINE_CFLAGS += -msse4.2
- endif
- ifneq ($(findstring SSE4_1, $(CPUFLAGS)),)
- MACHINE_CFLAGS += -msse4.1
- endif
- endif
- ifeq ($(shell test $(GCC_VERSION) -lt 43 && echo 1), 1)
- MACHINE_CFLAGS := $(filter-out -msse% -mssse%,$(MACHINE_CFLAGS))
- MACHINE_CFLAGS := $(patsubst -march=core2,-march=generic,$(MACHINE_CFLAGS))
- MACHINE_CFLAGS += -msse3
- endif
- ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1)
- MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
- endif
+ifeq ($(shell test $(GCC_VERSION) -le 49 && echo 1), 1)
+MACHINE_CFLAGS := $(patsubst -march=armv8-a+crc,-march=armv8-a+crc -D__ARM_FEATURE_CRC32=1,$(MACHINE_CFLAGS))
endif