Linux Operating System Source Code: IBM Patches

 
Makefile fix to correctly utilize non-default CC definition
Description:
An ia64 kernel build using `make CC=` with gcc version 2.X in your PATH fails with link-time undefined reference to __xchg_called_with_bad_pointer. The patch fixes this problem as well as other problems related to non-inlining of functions where inlining is intended.
Developer:
Gary Hade
Status:
Included in project
Release Included:
linux-2.4.18-ia64-020410

Notes:

If the gcc in your PATH is version 2.X and you are not using cross tools (the CROSS_COMPILE make macro is null) `make CC=` fails due to the lack of --param max-inline-insns=2000 on the compile lines.

This happens because GCC_VERSION in arch/ia64/Makefile is determined using $(CROSS_COMPILE)$(HOSTCC) which expands to "gcc" picking up gcc version 2.X. With GCC_VERSION defined as 2 the additional CFLAGS options within the ifneq ($(GCC_VERSION),2) are not being added.

You can work around the problem by also setting HOSTCC to the same value as CC on the make command line e.g. `make CC=` HOSTCC=` but the correct solution (provided in the patch) is to use $(CC) instead of $(CROSS_COMPILE)$(HOSTCC) to determine GCC_VERSION within arch/ia64/Makefile.

Release Notes Date Files
20020402 Release Notes 2002-04-02  
  File Notes   non-default-cc-makefile.patch.gz