From patchwork Fri Dec 18 18:00:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergio Prado X-Patchwork-Id: 559039 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 7E70F1402A1 for ; Sat, 19 Dec 2015 05:01:17 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=e-labworks-com.20150623.gappssmtp.com header.i=@e-labworks-com.20150623.gappssmtp.com header.b=2LFaLR78; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 6DC6C321E1; Fri, 18 Dec 2015 18:01:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yyKmYorMA1Vt; Fri, 18 Dec 2015 18:01:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3F41224EDA; Fri, 18 Dec 2015 18:01:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 9AEE51C1EB5 for ; Fri, 18 Dec 2015 18:01:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 97215A6393 for ; Fri, 18 Dec 2015 18:01:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XIAN9G3koGvX for ; Fri, 18 Dec 2015 18:01:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qg0-f44.google.com (mail-qg0-f44.google.com [209.85.192.44]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 84E10A6032 for ; Fri, 18 Dec 2015 18:01:10 +0000 (UTC) Received: by mail-qg0-f44.google.com with SMTP id c96so39245359qgd.3 for ; Fri, 18 Dec 2015 10:01:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=e-labworks-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=/LxeciF1MIoxvFOd5jClJG9MbiiqrLtp1JF1kP+11lI=; b=2LFaLR783KeVmQ1LjlNtjIt1jfueakni8J5j5PcQr0KFHwld04uXDKRRnaxfhD4H5W AsYz9XOlbcTgOezyhrrHcVc6a2g2kg27aTqWKcPWL3F1qvR/iqHe7No0EM3i78eHlfvA WC5cyfRGPZ6fUghnH3EKhA06cSL7x8+t0IYyxUvNliRYX4p2qlr/fghyYXCgKC4T4W8Q dOs9fKeJ3Z0RoF3o7IHJYoctmweJViogpem+WbRant1S6PPtlP/Ky8cirbdfkCp/qJaA 0jZYkb0BlosAJpnu9JtYQ7c+Q3XWQ6EhCYzJURel2iabDhgGLTvExPf5SSuDvKhBrfdv r65g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/LxeciF1MIoxvFOd5jClJG9MbiiqrLtp1JF1kP+11lI=; b=AoW+Og0yMrjmflRo1OuPx4DkySWSo9KzvrkOoYf6R9B1luIu559Kf2j8DCReod7tUh FM9Mg3V/DpVOz5cnVtUkmiHZXNv1B7aRmdlxHRy0aFpyNlYTkxDae/p7RZ18/3Ufq4+l JqX75HZ1w0yKBsnNGDBlKjdde/1pS9MUTKQ4+KQUdP2nZMGgmefzOMOvsxnflUg9NxT8 r8XVFbSxkUCndmKmEyk27uqpwwdYhAmUw7y6xgMSs/MX6YHu+wIZ/gXRCBd3TaHZhWfG O9H+MH+/cSP68FODepfANqai6S9YXi8nd1W4OyzTRGlv4qiZ9jHI9IB6WO8MkwNimdyp jLYg== X-Gm-Message-State: ALoCoQlH68JAMU/CY2jBNAw6k+NFHjJb17N6/+EM8w+UzvdTAEZV7fhbPHptxvuIKXUoTUmsAzJzFO0+5Ze96X/Ilm8TmjEAzA== X-Received: by 10.140.98.239 with SMTP id o102mr7033618qge.31.1450461669596; Fri, 18 Dec 2015 10:01:09 -0800 (PST) Received: from localhost.localdomain ([177.141.170.120]) by smtp.gmail.com with ESMTPSA id c67sm7220894qga.40.2015.12.18.10.01.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 18 Dec 2015 10:01:09 -0800 (PST) From: Sergio Prado To: buildroot@buildroot.org Date: Fri, 18 Dec 2015 16:00:45 -0200 Message-Id: <1450461645-28534-1-git-send-email-sergio.prado@e-labworks.com> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH 1/1] libgdiplus: fix cross-compilation error X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When cross-compiling with toolchains that validate things like headers and libraries paths, we were getting errors like: sh-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '/lib' That's because there was an error in the configure script that was not generating ldflags correctly, and the generated Makefile was trying to link with -L/lib. Also, it is necessary to pass a prefix when compiling with libjpeg and libtiff support. A patch has already been sent upstream. Fixes: http://autobuild.buildroot.org/results/58cad610b1bde68de82e44bf3c87d7bfcc1fa816/ http://autobuild.buildroot.org/results/649c258c05293fa5203d7d2c7b20a4265c2815ab/ Signed-off-by: Sergio Prado --- ...01-Fix-compile-error-when-cross-compiling.patch | 35 ++++++++++++++++++++++ package/libgdiplus/libgdiplus.mk | 4 +-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 package/libgdiplus/0001-Fix-compile-error-when-cross-compiling.patch -- 1.9.1 diff --git a/package/libgdiplus/0001-Fix-compile-error-when-cross-compiling.patch b/package/libgdiplus/0001-Fix-compile-error-when-cross-compiling.patch new file mode 100644 index 000000000000..321bbd49bb46 --- /dev/null +++ b/package/libgdiplus/0001-Fix-compile-error-when-cross-compiling.patch @@ -0,0 +1,35 @@ +From daf96b07c02734dceaf3c3b78c10e4e758b74d9e Mon Sep 17 00:00:00 2001 +From: Sergio Prado +Date: Fri, 18 Dec 2015 15:08:58 -0200 +Subject: [PATCH 1/1] Fix compile error when cross-compiling. + +When cross-compiling with libjpeg enabled, we can get errors like the +following when linking: + +sh-linux-gnu-gcc: ERROR: unsafe header/library path used in +cross-compilation: '/lib' + +That's because there is an error in the configure script that are not +generating ldflags correctly, and are trying to link with -L/lib. + +Signed-off-by: Sergio Prado +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 772d5fc9d87a..58d55ade48e3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -223,7 +223,7 @@ AC_ARG_WITH([libjpeg], + jpeg_ok=no) + AC_MSG_RESULT($jpeg_ok) + if test "$jpeg_ok" = yes; then +- JPEG='jpeg'; LIBJPEG='-L${libjpeg_prefix}/lib -ljpeg' ++ JPEG='jpeg'; LIBJPEG="-L${libjpeg_prefix}/lib -ljpeg" + else + AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***) + fi +-- +1.9.1 + diff --git a/package/libgdiplus/libgdiplus.mk b/package/libgdiplus/libgdiplus.mk index 3f7b2d7017eb..fdb5b5c1f45a 100644 --- a/package/libgdiplus/libgdiplus.mk +++ b/package/libgdiplus/libgdiplus.mk @@ -40,14 +40,14 @@ LIBGDIPLUS_CONF_OPTS += --without-libexif endif ifeq ($(BR2_PACKAGE_JPEG),y) -LIBGDIPLUS_CONF_OPTS += --with-libjpeg +LIBGDIPLUS_CONF_OPTS += --with-libjpeg=$(STAGING_DIR)/usr LIBGDIPLUS_DEPENDENCIES += jpeg else LIBGDIPLUS_CONF_OPTS += --without-libjpeg endif ifeq ($(BR2_PACKAGE_TIFF),y) -LIBGDIPLUS_CONF_OPTS += --with-libtiff +LIBGDIPLUS_CONF_OPTS += --with-libtiff=$(STAGING_DIR)/usr LIBGDIPLUS_DEPENDENCIES += tiff else LIBGDIPLUS_CONF_OPTS += --without-libtiff