hugetlb compile problems (2.4 with gcc-3.4)
Quoted 6 lines · Stephane Eranian
I have run into some compilation problems on
mm/hugetlb.cwhen using gcc3.4, it is more picky. It fails because in the latest 2.4 kernel there is the following:static long
htlbzone_pages;
Quoted 8 lines
int
set_hugetlb_mem_size(int count){ int j, lcount; struct page *page, *map;Quoted 1 line
Quoted 1 line
Quoted 1 line
extern long htlbzone_pages;extern struct list_head htlbpage_freelist;}
I applied the following patch for 2.4:
#### AUTHOR [email protected]
#### COMMENT START
### Comments for ChangeSet
HUGETLB: remove bogus "extern" decls to satisfy gcc-3.4. ### Comments for arch/ia64/mm/hugetlbpage.c
HUGETLB: remove bogus "extern" decls to satisfy gcc-3.4. #### COMMENT END
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.1076 -> 1.1077
# arch/ia64/mm/hugetlbpage.c 1.2 -> 1.3
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/08/13 [email protected] 1.1077
# HUGETLB: remove bogus "extern" decls to satisfy gcc-3.4.
# --------------------------------------------
#
arch/ia64/mm/hugetlbpage.c +1 -4
@@ -12,12 +12,11 @@#include <linux/pagemap.h> #include <linux/smp_lock.h> #include <linux/slab.h> -#include <linux/module.h> +#include <linux/sysctl.h> #include <asm/mman.h> #include <asm/pgalloc.h> #include <asm/tlb.h> -#include <linux/sysctl.h> #define TASK_HPAGE_BASE (REGION_HPAGE << REGION_SHIFT)
@@ -357,8 +356,6 @@ {int j, lcount;struct page *page, *map; -extern long htlbzone_pages; -extern struct list_head htlbpage_freelist;if (count <0 ) lcount = count;