Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jul 2018 13:05:33 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r474077 - in head/sysutils/e2fsprogs: . files
Message-ID:  <201807071305.w67D5XUv015248@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mandree
Date: Sat Jul  7 13:05:32 2018
New Revision: 474077
URL: https://svnweb.freebsd.org/changeset/ports/474077

Log:
  Unbreak aarch64 compilation by removing sbrk() references.

Added:
  head/sysutils/e2fsprogs/files/extrapatch-no-sbrk   (contents, props changed)
Modified:
  head/sysutils/e2fsprogs/Makefile

Modified: head/sysutils/e2fsprogs/Makefile
==============================================================================
--- head/sysutils/e2fsprogs/Makefile	Sat Jul  7 12:35:32 2018	(r474076)
+++ head/sysutils/e2fsprogs/Makefile	Sat Jul  7 13:05:32 2018	(r474077)
@@ -19,7 +19,6 @@ LICENSE_DISTFILES_GPLv2=	${DISTNAME}${EXTRACT_SUFX}
 PORTSCOUT=	ignore	# cannot handle the version in the directory
 
 .if !defined(MASTERDIR)
-BROKEN_aarch64=		fails to link: missing sbrk
 BROKEN_armv6=		fails to build: Tests failed: f_pre_1970_date_encoding
 BROKEN_armv7=		fails to build: Tests failed: f_pre_1970_date_encoding
 BROKEN_mips=		fails to build: Tests failed: f_pre_1970_date_encoding
@@ -111,6 +110,10 @@ libintl=	${LOCALBASE}/lib/libintl.a ${LOCALBASE}/lib/l
 .else
 CONFIGURE_ARGS+=--disable-nls
 libintl=
+.endif
+
+.if ${ARCH} == "aarch64"
+EXTRA_PATCHES+=	${FILESDIR}/extrapatch-no-sbrk
 .endif
 
 # d_fallocate_blkmap appears to fail on some systems for unknown reasons.

Added: head/sysutils/e2fsprogs/files/extrapatch-no-sbrk
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/e2fsprogs/files/extrapatch-no-sbrk	Sat Jul  7 13:05:32 2018	(r474077)
@@ -0,0 +1,34 @@
+diff -up ./e2fsck/e2fsck.h.orig ./e2fsck/e2fsck.h
+--- ./e2fsck/e2fsck.h.orig	2018-05-16 01:42:44.000000000 +0200
++++ ./e2fsck/e2fsck.h	2018-07-07 12:50:43.420944000 +0200
+@@ -134,7 +134,7 @@ struct dx_dirblock_info {
+ #define DX_FLAG_FIRST		4
+ #define DX_FLAG_LAST		8
+ 
+-#define RESOURCE_TRACK
++#undef RESOURCE_TRACK
+ 
+ #ifdef RESOURCE_TRACK
+ /*
+diff -up ./resize/resource_track.c.orig ./resize/resource_track.c
+--- ./resize/resource_track.c.orig	2018-05-16 01:42:44.000000000 +0200
++++ ./resize/resource_track.c	2018-07-07 14:24:54.728576000 +0200
+@@ -27,7 +27,6 @@ void init_resource_track(struct resource
+ 	io_stats io_start = 0;
+ 
+ 	track->desc = desc;
+-	track->brk_start = sbrk(0);
+ 	gettimeofday(&track->time_start, 0);
+ #ifdef HAVE_GETRUSAGE
+ #ifdef sun
+@@ -84,9 +83,7 @@ void print_resource_track(ext2_resize_t 
+ 		kbytes(malloc_info.arena), kbytes(malloc_info.hblkhd),
+ 		kbytes(malloc_info.uordblks), kbytes(malloc_info.fordblks));
+ #else
+-	printf("Memory used: %lu, ",
+-		(unsigned long) (((char *) sbrk(0)) -
+-				 ((char *) track->brk_start)));
++	printf("Memory used: unknown, ");
+ #endif
+ #ifdef HAVE_GETRUSAGE
+ 	getrusage(RUSAGE_SELF, &r);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807071305.w67D5XUv015248>