From patchwork Thu Sep 5 19:04:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1952 Return-Path: Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 253C560BF6 for ; Thu, 5 Sep 2019 21:04:41 +0200 (CEST) Received: by mail-wm1-x336.google.com with SMTP id y135so5671151wmc.1 for ; Thu, 05 Sep 2019 12:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Y0em7KE65E4vw8avDXZfP2Rm3jNkrhDEGXXPchWpQiw=; b=Y0RzOppTI6OuHIuscZP+Bi8L6TR08ZF9X/PIF196zlrx2eEcFA3FSL46bcdH7SS2xh EHZ5RCgFzANpO/iwxLJiObT9xeKtuNAu7okDaeJ551NhHSJGbkhcHE/X/4cMJzatJhYX Yava07RGqfBAPIQB4KNZ3iVPjNbkAaVs8LV8gNNC8A6JlNblkzyD99nybTtMuFptR1HX ZeomfnQ/RkMHqPnfxLMvOdLRo9MdJZJQj18tlphHuNJGXjmUFGWB/+fdJBaX2A5Ny3PF v1bXD847XlIRpdR+CjZhx0O9Ve4OfTKrXf823lcze5U3auXWdkCwDTcZgfmDF8PiSXOj 8SDw== 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:mime-version :content-transfer-encoding; bh=Y0em7KE65E4vw8avDXZfP2Rm3jNkrhDEGXXPchWpQiw=; b=uc6NY5VP11fhykREpRHlSMm1AIv46vgayYzvrqj7nnK7bw+N6xh550mRHUmxa+kUy8 1x1KOF/BtWRjePccV5YVxUCYldoUxTGauORgUJOl7lobxy8imOkdyildNgAppzXaowoG pj5KyEbXaibVqOa1avtuCyy6kZN2ZorA/VOh+Fin5BJLRJzMg3+hiSY3AJfTyUG/6G8k Zmsk91Fthm9smFtXDB9Co5RNydTPbMl/khe1NcdzFPHSKk+Aoz1nJEYxeNjSo/ZQR/km +VCglFXg5nZTJzuPRyoWWQhdI2Q3DQA/zySH2FznThJDdZ6yzDXYPUAvsTdxu0Fo1vxt Mkrg== X-Gm-Message-State: APjAAAXBrgEz5fWs9FrOFCkPSNNyyU5KDzpP5FnafeHiauS1QrxcqetE 6QPjlmSITXoi9QK1jlut2ytZsd0NC6o= X-Google-Smtp-Source: APXvYqz7Iuyvw8swAEgwXnOjK8oscbo6bwcVv6qy9SnJ9NvSy8Z0MRz6YyFaqAuc18LZq/JQ9xSkGQ== X-Received: by 2002:a1c:c013:: with SMTP id q19mr3793389wmf.87.1567710280486; Thu, 05 Sep 2019 12:04:40 -0700 (PDT) Received: from kali.home (lfbn-ren-1-605-248.w81-53.abo.wanadoo.fr. [81.53.181.248]) by smtp.gmail.com with ESMTPSA id g201sm5526282wmg.34.2019.09.05.12.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Sep 2019 12:04:39 -0700 (PDT) From: Fabrice Fontaine To: libcamera-devel@lists.libcamera.org Cc: Fabrice Fontaine Date: Thu, 5 Sep 2019 21:04:57 +0200 Message-Id: <20190905190457.19745-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.23.0.rc1 MIME-Version: 1.0 X-Mailman-Approved-At: Fri, 06 Sep 2019 01:28:29 +0200 Subject: [libcamera-devel] [PATCH] src/libcamera/meson.build: link with atomic when needed X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Sep 2019 19:04:41 -0000 On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with: /home/buildroot/autobuild/run/instance-3/output/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/7.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: src/libcamera/4ab8042@@camera@sha/v4l2_videodevice.cpp.o: in function `libcamera::V4L2VideoDevice::queueBuffer(libcamera::Buffer*)': v4l2_videodevice.cpp:(.text+0x1470): undefined reference to `__atomic_fetch_add_4' This is often for example the case on sparc v8 32 bits. Fixes: - http://autobuild.buildroot.org/results/1f0b8338f5f39aa86b9d432598dae2f53c5f7c84 Signed-off-by: Fabrice Fontaine Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index c5d8f11..0706a08 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -99,6 +99,7 @@ version_cpp = vcs_tag(command : [gen_version, meson.build_root()], libcamera_sources += version_cpp libcamera_deps = [ + cc.find_library('atomic', required: false), cc.find_library('dl'), libudev, dependency('threads'),