From: marco atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com, andrew@dunslane.net
Subject: Re: Binutils objcopy bug (was Re: rebase segfault)
Date: Mon, 04 Mar 2013 21:30:00 -0000 [thread overview]
Message-ID: <5135127D.3050607@gmail.com> (raw)
In-Reply-To: <5134FD6A.2000701@dunslane.net>
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
On 3/4/2013 9:00 PM, Andrew Dunstan wrote:
>
> I have not heard a word on this in the 5 weeks or so since it was sent.
> Are you guys interested in fixing this or not?
yes Andrew,
I am working on it, unfortunately this Makefile spaghetti
is not nice to handle
probably 90% is working now, but I just found
that postgres.exe is incomplete
attached current patch for my trial
src/backend/Makefile needs some works for
postgres.exe and libpostgres.a
that I hope is the only missing bit
>
> cheers
>
> andrew
Regards
Marco
[-- Attachment #2: post.patch --]
[-- Type: text/plain, Size: 7696 bytes --]
--- origsrc/postgresql-9.2.3/src/Makefile.shlib 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/Makefile.shlib 2013-03-04 11:56:36.238271500 +0100
@@ -284,6 +284,7 @@
endif
ifeq ($(PORTNAME), cygwin)
+ LINK.shared = $(CC) -shared
ifdef SO_MAJOR_VERSION
shlib = cyg$(NAME)$(DLSUFFIX)
endif
@@ -374,6 +375,16 @@
# If SHLIB_EXPORTS is set, the rules below will build a .def file from
# that. Else we build a temporary one here.
+ifeq ($(PORTNAME), cygwin)
+$(shlib): $(OBJS) | $(SHLIB_PREREQS)
+ $(CC) $(CFLAGS) -shared -o $@ $(OBJS) $(LDFLAGS) $(LDFLAGS_SL) $(SHLIB_LINK) $(LIBS) $(LDAP_LIBS_BE)
+
+$(stlib): $(OBJS) | $(SHLIB_PREREQS)
+ $(LINK.static) $@ $^
+ $(RANLIB) $@
+
+
+else
ifeq (,$(SHLIB_EXPORTS))
DLL_DEFFILE = lib$(NAME)dll.def
exports_file = $(DLL_DEFFILE)
@@ -390,6 +401,7 @@
$(stlib): $(shlib) $(DLL_DEFFILE) | $(SHLIB_PREREQS)
$(DLLTOOL) --dllname $(shlib) $(DLLTOOL_LIBFLAGS) --def $(DLL_DEFFILE) --output-lib $@
+endif # PORTNAME == cygwin
endif # PORTNAME == cygwin || PORTNAME == win32
endif # enable_shared
--- origsrc/postgresql-9.2.3/src/backend/Makefile 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/backend/Makefile 2013-03-04 11:18:03.048271500 +0100
@@ -47,7 +47,6 @@
all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP)
-ifneq ($(PORTNAME), cygwin)
ifneq ($(PORTNAME), win32)
ifneq ($(PORTNAME), aix)
@@ -56,24 +55,6 @@
endif
endif
-endif
-
-ifeq ($(PORTNAME), cygwin)
-
-postgres: $(OBJS) postgres.def libpostgres.a
- $(DLLTOOL) --dllname $@$(X) --output-exp $@.exp --def postgres.def
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) -o $@$(X) -Wl,--base-file,$@.base $@.exp $(call expand_subsys,$(OBJS)) $(LIBS)
- $(DLLTOOL) --dllname $@$(X) --base-file $@.base --output-exp $@.exp --def postgres.def
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_EX) -Wl,--stack,$(WIN32_STACK_RLIMIT) -o $@$(X) $@.exp $(call expand_subsys,$(OBJS)) $(LIBS)
- rm -f $@.exp $@.base
-
-postgres.def: $(OBJS)
- $(DLLTOOL) --export-all --output-def $@ $(call expand_subsys,$^)
-
-libpostgres.a: postgres.def
- $(DLLTOOL) --dllname postgres.exe --def postgres.def --output-lib $@
-
-endif # cygwin
ifeq ($(PORTNAME), win32)
LIBS += -lsecur32
@@ -210,7 +191,7 @@
install: all installdirs install-bin
ifeq ($(PORTNAME), cygwin)
ifeq ($(MAKE_DLL), true)
- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
+# $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a'
endif
endif
ifeq ($(PORTNAME), win32)
--- origsrc/postgresql-9.2.3/src/bin/pg_basebackup/Makefile 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/bin/pg_basebackup/Makefile 2013-03-04 11:12:39.523271500 +0100
@@ -16,6 +16,8 @@
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
+LIBS += $(LIBS) $(LDAP_LIBS_BE)
+
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
OBJS=receivelog.o streamutil.o $(WIN32RES)
--- origsrc/postgresql-9.2.3/src/bin/pg_ctl/Makefile 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/bin/pg_ctl/Makefile 2013-03-04 11:04:16.268271500 +0100
@@ -23,7 +23,7 @@
all: pg_ctl
pg_ctl: $(OBJS) | submake-libpq submake-libpgport
- $(CC) $(CFLAGS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+ $(CC) $(CFLAGS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) $(LDAP_LIBS_BE)
install: all installdirs
$(INSTALL_PROGRAM) pg_ctl$(X) '$(DESTDIR)$(bindir)/pg_ctl$(X)'
--- origsrc/postgresql-9.2.3/src/bin/pg_dump/Makefile 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/bin/pg_dump/Makefile 2013-03-04 11:10:40.034271500 +0100
@@ -12,10 +12,13 @@
PGFILEDESC = "pg_dump/pg_restore/pg_dumpall - backup and restore PostgreSQL databases"
PGAPPICON=win32
+
subdir = src/bin/pg_dump
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
+LIBS += $(LIBS) $(LDAP_LIBS_BE)
+
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \
@@ -30,7 +33,7 @@
all: pg_dump pg_restore pg_dumpall
pg_dump: pg_dump.o common.o pg_dump_sort.o $(OBJS) $(KEYWRDOBJS) | submake-libpq submake-libpgport
- $(CC) $(CFLAGS) pg_dump.o common.o pg_dump_sort.o $(KEYWRDOBJS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+ $(CC) $(CFLAGS) pg_dump.o common.o pg_dump_sort.o $(KEYWRDOBJS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
pg_restore: pg_restore.o $(OBJS) $(KEYWRDOBJS) | submake-libpq submake-libpgport
$(CC) $(CFLAGS) pg_restore.o $(KEYWRDOBJS) $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
--- origsrc/postgresql-9.2.3/src/bin/psql/Makefile 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/bin/psql/Makefile 2013-03-04 11:11:05.859271500 +0100
@@ -16,6 +16,8 @@
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
+LIBS += $(LIBS) $(LDAP_LIBS_BE)
+
REFDOCDIR= $(top_srcdir)/doc/src/sgml/ref
override CPPFLAGS := -I. -I$(srcdir) -I$(libpq_srcdir) -I$(top_srcdir)/src/bin/pg_dump $(CPPFLAGS)
--- origsrc/postgresql-9.2.3/src/bin/scripts/Makefile 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/bin/scripts/Makefile 2013-03-04 11:11:44.367271500 +0100
@@ -16,6 +16,8 @@
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
+LIBS += $(LIBS) $(LDAP_LIBS_BE)
+
PROGRAMS = createdb createlang createuser dropdb droplang dropuser clusterdb vacuumdb reindexdb
override CPPFLAGS := -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/src/bin/psql -I$(libpq_srcdir) $(CPPFLAGS)
--- origsrc/postgresql-9.2.3/src/interfaces/libpq/Makefile 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/interfaces/libpq/Makefile 2013-03-04 11:03:01.935271500 +0100
@@ -27,7 +27,7 @@
# Need to recompile any external C files because we need
# all object files to use the same compile flags as libpq; some
# platforms require special flags.
-LIBS := $(LIBS:-lpgport=)
+LIBS := $(LIBS:-lpgport=) $(LDAP_LIBS_BE)
# We can't use Makefile variables here because the MSVC build system scrapes
# OBJS from this file.
--- origsrc/postgresql-9.2.3/src/makefiles/Makefile.cygwin 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/makefiles/Makefile.cygwin 2013-02-08 06:49:00.645766200 +0100
@@ -1,6 +1,4 @@
# src/makefiles/Makefile.cygwin
-DLLTOOL= dlltool
-DLLWRAP= dllwrap
ifdef PGXS
BE_DLLLIBS= -L$(libdir) -lpostgres
else
@@ -40,6 +38,4 @@
# Rule for building a shared library from a single .o file
%.dll: %.o
- $(DLLTOOL) --export-all --output-def $*.def $<
- $(DLLWRAP) -o $@ --def $*.def $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
- rm -f $*.def
+ $(CC) $(CFLAGS) -shared -o $@ $< $(LDFLAGS) $(LDFLAGS_SL) $(BE_DLLLIBS)
--- origsrc/postgresql-9.2.3/src/makefiles/pgxs.mk 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/makefiles/pgxs.mk 2013-03-03 22:40:26.148157400 +0100
@@ -296,5 +296,5 @@
ifdef PROGRAM
$(PROGRAM): $(OBJS)
- $(CC) $(CFLAGS) $(OBJS) $(PG_LIBS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+ $(CC) $(CFLAGS) $(OBJS) $(PG_LIBS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) $(LDAP_LIBS_BE) -o $@$(X)
endif
--- origsrc/postgresql-9.2.3/src/port/Makefile 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/port/Makefile 2013-03-04 10:59:59.686271500 +0100
@@ -28,7 +28,7 @@
include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I$(top_builddir)/src/port -DFRONTEND $(CPPFLAGS)
-LIBS += $(PTHREAD_LIBS)
+LIBS += $(PTHREAD_LIBS) $(LDAP_LIBS_BE)
OBJS = $(LIBOBJS) chklocale.o dirmod.o erand48.o exec.o fls.o inet_net_ntop.o \
noblock.o path.o pgcheckdir.o pg_crc.o pgmkdirp.o pgsleep.o \
[-- Attachment #3: test.patch --]
[-- Type: text/plain, Size: 3237 bytes --]
--- origsrc/postgresql-9.2.3/src/test/regress/parallel_schedule 2013-02-04 22:28:13.000000000 +0100
+++ src/postgresql-9.2.3/src/test/regress/parallel_schedule 2013-02-08 07:07:03.526595700 +0100
@@ -13,7 +13,8 @@
# ----------
# The first group of parallel tests
# ----------
-test: boolean char name varchar text int2 int4 int8 oid float4 float8 bit numeric txid uuid enum money rangetypes
+test: boolean char name varchar text int2 int4 int8 oid
+test: float4 float8 bit numeric txid uuid enum money rangetypes
# Depends on things setup during char, varchar and text
test: strings
@@ -23,7 +24,8 @@
# ----------
# The second group of parallel tests
# ----------
-test: point lseg box path polygon circle date time timetz timestamp timestamptz interval abstime reltime tinterval inet macaddr tstypes comments
+test: point lseg box path polygon circle date time timetz timestamp
+test: timestamptz interval abstime reltime tinterval inet macaddr tstypes comments
# ----------
# Another group of parallel tests
@@ -78,7 +80,10 @@
# ----------
# Another group of parallel tests
# ----------
-test: select_into select_distinct select_distinct_on select_implicit select_having subselect union case join aggregates transactions random portals arrays btree_index hash_index update namespace prepared_xacts delete
+# test: select_into select_distinct select_distinct_on select_implicit select_having subselect union case join aggregates transactions random portals arrays btree_index hash_index update namespace prepared_xacts delete
+test: select_into select_distinct select_distinct_on select_implicit select_having subselect union case
+test: join aggregates transactions random portals arrays btree_index hash_index update namespace delete
+# test: prepared_xacts
# ----------
# Another group of parallel tests
@@ -92,14 +97,18 @@
# ----------
# Another group of parallel tests
# ----------
-test: select_views portals_p2 foreign_key cluster dependency guc bitmapops combocid tsearch tsdicts foreign_data window xmlmap functional_deps advisory_lock json
+#test: select_views portals_p2 foreign_key cluster dependency guc bitmapops combocid tsearch tsdicts foreign_data window xmlmap functional_deps advisory_lock json
+test: select_views portals_p2 foreign_key cluster dependency guc bitmapops
+test: combocid tsearch tsdicts foreign_data window xmlmap functional_deps advisory_lock json
# ----------
# Another group of parallel tests
# NB: temp.sql does a reconnect which transiently uses 2 connections,
# so keep this parallel group to at most 19 tests
# ----------
-test: plancache limit plpgsql copy2 temp domain rangefuncs prepare without_oid conversion truncate alter_table sequence polymorphism rowtypes returning largeobject with xml
+# test: plancache limit plpgsql copy2 temp domain rangefuncs prepare without_oid conversion truncate alter_table sequence polymorphism rowtypes returning largeobject with xml
+test: plancache limit plpgsql copy2 temp domain rangefuncs prepare without_oid conversion
+test: conversion truncate alter_table sequence polymorphism rowtypes returning largeobject with xml
# run stats by itself because its delay may be insufficient under heavy load
test: stats
[-- Attachment #4: Type: text/plain, Size: 218 bytes --]
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2013-03-04 21:30 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 8:44 rebase segfault marco atzeri
2013-01-15 10:08 ` Corinna Vinschen
2013-01-15 10:36 ` marco atzeri
2013-01-15 11:24 ` Corinna Vinschen
2013-01-15 22:04 ` marco atzeri
2013-01-16 7:16 ` marco atzeri
2013-01-16 12:35 ` Binutils objcopy bug (was Re: rebase segfault) Corinna Vinschen
2013-01-16 13:38 ` marco atzeri
2013-01-16 14:42 ` Corinna Vinschen
2013-01-16 15:12 ` marco atzeri
2013-01-16 16:26 ` Corinna Vinschen
2013-01-24 9:02 ` Yaakov
2013-01-24 9:28 ` Corinna Vinschen
2013-01-24 9:49 ` marco atzeri
2013-01-24 10:01 ` Corinna Vinschen
2013-01-24 10:16 ` marco atzeri
2013-01-24 12:09 ` Corinna Vinschen
2013-01-24 12:35 ` marco atzeri
2013-01-24 14:12 ` Corinna Vinschen
2013-01-25 12:34 ` marco atzeri
2013-01-25 13:20 ` Kai Tietz
2013-01-25 15:01 ` Corinna Vinschen
2013-01-25 15:12 ` marco atzeri
2013-01-26 6:32 ` Reini Urban
2013-01-26 7:53 ` marco atzeri
2013-01-29 22:30 ` Reini Urban
2013-01-30 16:46 ` Andrew Dunstan
2013-01-30 17:03 ` marco atzeri
2013-03-04 20:01 ` Andrew Dunstan
2013-03-04 21:30 ` marco atzeri [this message]
2013-03-04 21:41 ` Andrew Dunstan
2013-03-04 22:32 ` Andrew Dunstan
2013-03-05 5:42 ` marco atzeri
2013-03-05 15:39 ` Andrew Dunstan
2013-01-25 13:22 ` Kai Tietz
2013-01-24 15:56 ` Christopher Faylor
2013-01-24 16:17 ` marco atzeri
2013-01-18 15:34 ` marco atzeri
2013-01-18 15:44 ` Christopher Faylor
2013-01-19 8:56 ` marco atzeri
2013-01-19 15:23 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5135127D.3050607@gmail.com \
--to=marco.atzeri@gmail.com \
--cc=andrew@dunslane.net \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).