From patchwork Thu Jul 26 23:19:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 143003 Delivered-To: patches@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp146905ljj; Thu, 26 Jul 2018 16:19:30 -0700 (PDT) X-Received: by 2002:a63:e452:: with SMTP id i18-v6mr3646818pgk.185.1532647170481; Thu, 26 Jul 2018 16:19:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532647170; cv=none; d=google.com; s=arc-20160816; b=E0PexSzDktEt/49teuDJnH8AgoGDDNjvSyDuJmiVk9KXUm4VuJREkE+Je1Ne6wZLy1 d2+UEHjaYU0wByxOQ3AZ5tSfwShBwHqAfHhwcBVcJ85aRp4efqmPcgxZl5SA1d8jIz3n nctrefkHd3DOSGa5usgYYHHDmtXVejDJtxf+kGtN+wIYMEHVqy9F0OYIettNn4JVqIAu 8lVnbIHrKBue9EHHzEmoBU75RvqCaNkTQR8j/67j7j5ZqtMpumWYWeQTTAEn5K+p9JmZ vbTAGgurBY/k4M3+fAqLB6U/78El/AQPdqx4VHTa51Tmmcm9jX2Cogb4/yzzzqzFpzO4 nWCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=ZBmB5pu2oLcInCxO6Y+YpTcbs8lwYXREe327hpKFo+M=; b=yb26RWAYVS7+swMhSCQK+FGZs86Wyamr0CRHTFdETPcujFOW32hDKoief1VYgkSNKU tyBCQIWuHPKcNp06EeOZIMhPCpPjitOyyVSporpuf/u6JkIrdhrUWJnmuvNGcXeMECVc D9GoQfy0ToqxlNTpKeUl1nFb40AyozyPxQ0VaseLh5hncGRl3BXKX9VG4klNtdSubd9i aSAoCAeyPIegW+uUQhlPJN/dao+SgSunijAlTbLr72xUFJW6QDy/BjvYGIyZ4o/DVEfQ YYaWtAi/ynIriz3P+L+sltM8kaWx/F0Dwqx0o+iXU+hEmFGejuhR2o1JxSQui0QSxGgC 2BkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h5AaE7Jl; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id g36-v6sor743443plb.4.2018.07.26.16.19.30 for (Google Transport Security); Thu, 26 Jul 2018 16:19:30 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h5AaE7Jl; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZBmB5pu2oLcInCxO6Y+YpTcbs8lwYXREe327hpKFo+M=; b=h5AaE7JlyywOtaQaCWk6Jz3VnfmXvinSmb7ALk26Oe6INFpI19RKmM4+KAL/OsoMPV v5xchOy8pMAYiUOp8KJGpYJLsYi761AcZ9HTHHdcHGwWM5ONcDdNau1/3oUJ5s8qwRll H25uuv7ToBZT67XTTUrRIhye36CDT/1gPXlWU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZBmB5pu2oLcInCxO6Y+YpTcbs8lwYXREe327hpKFo+M=; b=daAZmciFJkNNhG1+zQ35Mu4yFb4b4tphK95Mx2wdmG6OpMMTYnFu0oWb/bQmPHOEg+ aullw/BGGVFMh3pNSRC4bvEzmMi+OrGcgU2MiZOJf2GNnLIquT6PZzSZf0eldC62T+Pr olntqVDVb3Vb1Oym+uogYC/UdZhCx6ukSe7DGmD6ugYElLg3d8mes1wo2VFIaot1HQgo ztCdtfutGbr75fgIwH6XarnefFyxpxwoRbntBaaidyW6rmlrrPQs0B5uDcyrzHYkWS+Q ipdbZlTSEJfsXUHSdJjRMi3+GuvT0AewtRP0ZXSb5bgVnAt9Urmmm8NSzkbUIKC2CqCw tLLQ== X-Gm-Message-State: AOUpUlHJCOhZnOp80EbML2jo9//UO+k3vqwY2Irsukr+D6H32KMf5pNz iGnHW7fge0lQq1YRNtwHsoIYBAdQ X-Google-Smtp-Source: AAOMgpcC3MxioaCu/y/C7nF0B/xlydZQlXEK7y22fhp/jPsZswVlz9Gyl/NWKjAwr/luZwyS5sswJw== X-Received: by 2002:a17:902:15c5:: with SMTP id a5-v6mr3631400plh.137.1532647169924; Thu, 26 Jul 2018 16:19:29 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:600:5100:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id k26-v6sm8777090pfb.167.2018.07.26.16.19.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Jul 2018 16:19:28 -0700 (PDT) From: John Stultz To: mesa-dev Cc: Sumit Semwal , Rob Herring , Alistair Strachan , Marissa Wall , Emil Velikov , Rob Clark , John Stultz Subject: [PATCH 2/3 v3] Android.common.mk: define HAVE_TIMESPEC_GET Date: Thu, 26 Jul 2018 16:19:21 -0700 Message-Id: <1532647161-20906-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: From: Sumit Semwal This is a forward port of a patch from the AOSP/master tree: https://android.googlesource.com/platform/external/mesa3d/+/bd30b663f55f8af73a0be4446349c5a2d4c641b0%5E%21/ Since https://android-review.googlesource.com/c/718518 added timespec_get() to bionic, mesa3d doesn't build due to redefinition of timespec_get(). Avoid redefinition by defining HAVE_TIMESPEC_GET flag. Test: build and boot tested db820c to UI. Cc: Rob Herring Cc: Alistair Strachan Cc: Marissa Wall Cc: Sumit Semwal Cc: Emil Velikov Cc: Rob Clark Reviewed-by: Emil Velikov Signed-off-by: Sumit Semwal Signed-off-by: John Stultz --- v2: Conditionalize it for PLATFORM_VERSION Q and higher v3: Rework conditionalization to numbered releases prior to P (9.0) --- Android.common.mk | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.7.4 diff --git a/Android.common.mk b/Android.common.mk index 397dc03..619b216 100644 --- a/Android.common.mk +++ b/Android.common.mk @@ -89,6 +89,13 @@ LOCAL_CPPFLAGS += \ LOCAL_CONLYFLAGS += \ -std=c99 +# c11 timespec_get is part of bionic as well +# https://android-review.googlesource.com/c/718518 +# This means releases from P and earlier won't need this +ifeq ($(filter 5 6 7 8 9, $(MESA_ANDROID_MAJOR_VERSION)),) +LOCAL_CFLAGS += -DHAVE_TIMESPEC_GET +endif + ifeq ($(strip $(MESA_ENABLE_ASM)),true) ifeq ($(TARGET_ARCH),x86) LOCAL_CFLAGS += \