aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-11-30 02:38:00 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-11-30 02:40:56 +0300
commit0232507c4f4195ad95eb383166cd8788564a0fba (patch)
tree3b7cb58b8a9dfd0a46f5b479e5bd898ccb20f266
parentd68d42dd861ea25904b8c751e3445bdbab82c6ec (diff)
Use compiler class instead of id where appropriate
-rw-r--r--libpq/buildfile11
1 files changed, 5 insertions, 6 deletions
diff --git a/libpq/buildfile b/libpq/buildfile
index fcaa8d0..87000d9 100644
--- a/libpq/buildfile
+++ b/libpq/buildfile
@@ -16,7 +16,6 @@ lib{pq}: c{*} h{$h} file{**.h -{$h}} file{win32/libpqdll.def} \
file{pg_service.conf.sample}
tclass = $c.target.class
-tsys = $c.target.system
if ($tclass == "windows")
lib{pq}: win32/c{*}
@@ -78,7 +77,7 @@ c.poptions =+ "-I$out_root" "-I$src_root" "-I$src_base" \
if ($tclass == "windows")
obj{*}: c.poptions =+ "-I$src_base/win32"
-if ($tsys == "win32-msvc")
+if ($c.class == 'msvc')
{
c.poptions =+ "-I$src_base/postgresql/port/win32_msvc"
@@ -87,7 +86,7 @@ if ($tsys == "win32-msvc")
c.poptions += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
c.coptions += /wd4018 /wd4244 /wd4267
}
-else
+elif ($c.class == 'gcc')
{
# Omit -fexcess-precision=standard as -std=9x implies it.
#
@@ -156,15 +155,15 @@ else
{
def = $src_base/win32/libpqdll.def
- if ($tsys == "mingw32")
+ if ($c.target.system == "mingw32")
{
- libs{pq}: c.loptions += $def
c.libs += -lsecur32 -lws2_32 -ladvapi32
+ libs{pq}: c.libs =+ $def
}
else
{
- libs{pq}: c.loptions += "/DEF:$def"
c.libs += secur32.lib ws2_32.lib advapi32.lib
+ libs{pq}: c.libs =+ "/DEF:$def"
}
# The original package also adds the resource file to the library. The file