From 54fe4d2d09c5cc2a8eebfcfcce3511c05617ef4e Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Mon, 3 Apr 2017 15:09:31 +0530 Subject: [PATCH] Force stdlib=libc++ on UB14.04 Change-Id: I7f24d663e57fbbee56afde12a0e61fc8bfc1e9b6 [ROCm/hip commit: 90cd2945f995f7943d55cb2e38e8942fce1b3dd2] --- projects/hip/bin/hipcc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/hip/bin/hipcc b/projects/hip/bin/hipcc index de4883fea3..bcd3e3a591 100755 --- a/projects/hip/bin/hipcc +++ b/projects/hip/bin/hipcc @@ -123,6 +123,14 @@ if ($HIP_PLATFORM eq "hcc") { } } + # Force -stdlib=libc++ on UB14.04 + $HOST_OSNAME= `cat /etc/os-release | grep "^ID\=" | cut -d= -f2 | tr -d '\n'`; + $HOST_OSVER= `cat /etc/os-release | grep "^VERSION_ID\=" | cut -d= -f2 | tr -d '\n'`; + if ($HOST_OSNAME eq "ubuntu" and $HOST_OSVER eq "\"14.04\"") { + $HIPCXXFLAGS .= " -stdlib=libc++"; + $setStdLib = 1; + } + $HIPCXXFLAGS .= " -I$HIP_PATH/include/hip/hcc_detail/cuda"; $HIPCXXFLAGS .= " -I$HSA_PATH/include"; $HIPCXXFLAGS .= " -Wno-deprecated-register";