English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 03 February 2018, 20:24   #721
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
that's pretty cool. this may help with other project depending on cmake.

were you able to finish the whole yaml-cpp build, since it doesnt find includes in:
/opt/m68k-amigaos/lib/gcc/m68k-amigaos/6.4.1b/include/c++/tr1/wctype.h
wctype.h / wchar.h
I thought those paths are somehow gcc internal, do we have to included it in CXXFLAGS?
http://eab.abime.net/showpost.php?p=...&postcount=718
Marlon_ is offline  
Old 03 February 2018, 20:33   #722
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by Marlon_ View Post
#1) I saw the answers added above

is there a cmake option to list all those defintions ( -D .... ) for the given CMakeLists.txt?
emufan is offline  
Old 03 February 2018, 20:35   #723
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by emufan View Post
#1) I saw the answers added above

is there a cmake option to list all those defintions ( -D .... ) for the given CMakeLists.txt?
Lets move this discussion here: http://eab.abime.net/showthread.php?t=90570&page=4
Marlon_ is offline  
Old 03 February 2018, 21:19   #724
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
@bebbo

btw, by chance, you didnt made any attempt to make gcc deal with motorola asm syntax so far?
wawa is offline  
Old 03 February 2018, 22:48   #725
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by emufan View Post
I guess not, everything removed before I build new toolchain.
maybe something with my selfmade Makefile, since m68k-amigaos-ranlib.exe works with cmake build lib,
which uses the same gcc toolchain binaries.
note that you must not append trash data to a hunk library file - some people used to append a version string to the lib...
bebbo is offline  
Old 03 February 2018, 22:49   #726
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
btw: amiga-gcc has now support for the sdks.
bebbo is offline  
Old 03 February 2018, 22:50   #727
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by bebbo View Post
btw: amiga-gcc has now support for the sdks.
sweet, there's no need for the old toolchain then!
Marlon_ is offline  
Old 03 February 2018, 23:01   #728
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by bebbo View Post
note that you must not append trash data to a hunk library file - some people used to append a version string to the lib...
cannot say, if I did so, here is my selfmade makefile for yaml-cpp:
Code:
CXX=m68k-amigaos-g++.exe
AR=m68k-amigaos-ar.exe
RANLIB=m68k-amigaos-ranlib.exe
CXXFLAGS=-noixemul -c -Wall -Iinclude
LDFLAGS=
SOURCES=src/binary.cpp \
	src/convert.cpp \
	src/directives.cpp \
	src/emit.cpp \
	src/emitfromevents.cpp \
	src/emitter.cpp \
	src/emitterstate.cpp \
	src/emitterutils.cpp \
	src/exceptions.cpp \
	src/exp.cpp \
	src/memory.cpp \
	src/node.cpp \
	src/node_data.cpp \
	src/nodebuilder.cpp \
	src/nodeevents.cpp \
	src/null.cpp \
	src/ostream_wrapper.cpp \
	src/parse.cpp \
	src/parser.cpp \
	src/regex_yaml.cpp \
	src/scanner.cpp \
	src/scanscalar.cpp \
	src/scantag.cpp \
	src/scantoken.cpp \
	src/simplekey.cpp \
	src/singledocparser.cpp \
	src/stream.cpp \
	src/tag.cpp \
	src/contrib/graphbuilder.cpp \
	src/contrib/graphbuilderadapter.cpp

OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=yaml-cpp
LIBRARY=libyaml-cpp.a

# all: $(SOURCES) $(EXECUTABLE) $(LIBRARY)
all: $(SOURCES) $(LIBRARY)

$(EXECUTABLE): $(OBJECTS)
	$(CXX) $(LDFLAGS) $(OBJECTS) -o $@

$(LIBRARY): $(OBJECTS)
	$(AR) cru libyaml-cpp.a  src/binary.o src/convert.o src/directives.o src/emit.o src/emitfromevents.o src/emitter.o src/emitterstate.o src/emitterutils.o src/exceptions.o src/exp.o src/memory.o src/node.o src/node_data.o src/nodebuilder.o src/nodeevents.o src/null.o src/ostream_wrapper.o src/parse.o src/parser.o src/regex_yaml.o src/scanner.o src/scanscalar.o src/scantag.o src/scantoken.o src/simplekey.o src/singledocparser.o src/stream.o src/tag.o src/contrib/graphbuilder.o src/contrib/graphbuilderadapter.o
	$(RANLIB) libyaml-cpp.a

cpp.o:
	$(CXX) $(CXXFLAGS) $< -o $@

clean :
	-rm -r src/*.o libyaml-cpp.a
Quote:
Originally Posted by bebbo View Post
btw: amiga-gcc has now support for the sdks.
yep, good news. will try this version next time

Last edited by emufan; 03 February 2018 at 23:10.
emufan is offline  
Old 03 February 2018, 23:05   #729
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by wawa View Post
@bebbo

btw, by chance, you didnt made any attempt to make gcc deal with motorola asm syntax so far?
gcc *is* creating motorola asm code
as *does* assemble motorola asm code

Only objdump does not yet produce morotola asm code. And it is dumb work with little value for me...
bebbo is offline  
Old 03 February 2018, 23:08   #730
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by emufan View Post
cannot say, if I did so, here is the makefile:
Code:
...
that's looking ok to me - no idea.

note: ranlib can actually be omitted...
bebbo is offline  
Old 03 February 2018, 23:13   #731
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
note: ranlib can actually be omitted...
ok, good to know.
Quote:
Originally Posted by bebbo View Post
that's looking ok to me - no idea.
I just extracted the yaml-cpp source somewhere else, put my makefile in that folder.
now it does build without ranlib error.
Code:
$ m68k-amigaos-ar.exe t libyaml-cpp.a
binary.o
convert.o
....
graphbuilderadapter.o
maybe there was some cygwin stuff left from my previous tests *argh*

Last edited by emufan; 03 February 2018 at 23:21.
emufan is offline  
Old 03 February 2018, 23:21   #732
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by emufan View Post
ok, good to know.

I just extracted the yaml-cpp source somewhere else, put my makefile in that folder.
now it does build without ranlib error.
maybe there was some cygwin stuff left from my previous tests *argh*
nice

(maybe it was an arch object file? I think you can add it to a hunk lib but the hunk ranlib can't parse it)

I used cygwin too, but now I'm often using a Linux/VM since it's way faster.
bebbo is offline  
Old 03 February 2018, 23:36   #733
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by bebbo View Post
nice
yep, good to see things are working as they should
Quote:
(maybe it was an arch object file? I think you can add it to a hunk lib but the hunk ranlib can't parse it)
it was build with the very same binaries and makefile.
Quote:
I used cygwin too, but now I'm often using a Linux/VM since it's way faster.
I should consider that too, with all the bloatware on that windows box, it slows down things alot,
and does crash whole windows, using "-j4" "--threads 4" ...
have to reboot to windows safe mode (f8) - 30 mins vs xx hours :/
emufan is offline  
Old 04 February 2018, 21:33   #734
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by bebbo View Post
gcc *is* creating motorola asm code
as *does* assemble motorola asm code

Only objdump does not yet produce morotola asm code. And it is dumb work with little value for me...
just tested it and apparently your gcc undestands motorola syntax better then the aros one. id love to borrow the code in question for aros68k if i may, i was looking for it in binutils gas (im diffing it with aros sources), but cannot locate the responsible section. any hint where to find it?

btw. apparently it still doesnt parse semicolon as a comment token.

Last edited by wawa; 04 February 2018 at 21:39.
wawa is offline  
Old 04 February 2018, 22:10   #735
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 681
Quote:
Originally Posted by wawa View Post
just tested it and apparently your gcc undestands motorola syntax better then the aros one. id love to borrow the code in question for aros68k if i may, i was looking for it in binutils gas (im diffing it with aros sources), but cannot locate the responsible section. any hint where to find it?

btw. apparently it still doesnt parse semicolon as a comment token.
the semicolon is often used to separate multiple insns in same line

=> can't change it without hitting to much

And I guess, you simply have to define

Code:
#define REGISTER_PREFIX_OPTIONAL 1

EDIT:

objdump displays now MOTOROLA syntax.

Code:
> m68k-amigaos-objdump.exe  -dA ins.o
ins.o:     file format amiga

Disassembly of section .text:

LLL:
        asl.w #2,d2
        moveq #1,d0
        move.l d0,(a0)+
        move.l d0,-(a0)
        movea.w d0,a0
        move.l d0,-123(a0)
        move.l d0,123(a0)
        move.l d0,(42,a0,d1.w)
        move.l d0,(42,a0,d1.w*4)
        move.l d0,([42,a0],d1.w*4,7)
        move.l d0,([42,a0,d1.w*4],7)
        lea LLL+0xa7(pc),a0
        bne.s LLL+0x44
        move.l (LLL+0x5c,pc,d1.w),d0
        move.l ([LLL+0x60,pc],d1.w*4,3),d0
        move.l ([LLL+0x68,pc,d1.w*4],3),d0
        rts

Last edited by bebbo; 04 February 2018 at 23:51.
bebbo is offline  
Old 05 February 2018, 00:23   #736
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
Quote:
Originally Posted by bebbo View Post
the semicolon is often used to separate multiple insns in same line

=> can't change it without hitting to much
but at the beginning of the line semicolon is clearly meant as a comment, i believe? parsing this shouldnt break anything i quess.
wawa is offline  
Old 05 February 2018, 03:51   #737
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
btw:
Code:
error: no such remote ref f494ffb0f9f668a9111d7ad3afa2d7a50a348a53
Fetched in submodule path 'submodules/binutils-2.14', but it did not contain f494ffb0f9f668a9111d7ad3afa2d7a50a348a53. Direct fetching of that commit failed.
ERROR: command "git submodule update" failed with 1
any idea what may be wrong? i tried to pull and clean rebuild every way i could think of..
wawa is offline  
Old 05 February 2018, 03:57   #738
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by wawa View Post
btw:
Code:
error: no such remote ref f494ffb0f9f668a9111d7ad3afa2d7a50a348a53
Fetched in submodule path 'submodules/binutils-2.14', but it did not contain f494ffb0f9f668a9111d7ad3afa2d7a50a348a53. Direct fetching of that commit failed.
ERROR: command "git submodule update" failed with 1
any idea what may be wrong? i tried to pull and clean rebuild every way i could think of..
Are you using this: https://github.com/bebbo/amigaos-cross-toolchain

Or are you using this: https://github.com/bebbo/amiga-gcc

?
Marlon_ is offline  
Old 05 February 2018, 04:02   #739
wawa
Registered User
 
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
amigaos-cross-toolchain afa i see..
wawa is offline  
Old 05 February 2018, 04:07   #740
Marlon_
AmigaDev.com
 
Marlon_'s Avatar
 
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
Quote:
Originally Posted by wawa View Post
amigaos-cross-toolchain afa i see..
I recommend using amiga-gcc as it's essentially the same, but compiles much faster as it supports parallell compilation. I'm compiling it all with "make -j8" and it takes no time to compile it all. Cygwin might have an issue with it, but as long as you're compiling native on Linux or Mac, there shouldn't be an issue.
Marlon_ is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
New GCC based dev toolchain for AmigaOS 3.x cla Coders. Releases 8 24 December 2017 10:18
Issue with photon/xxxx WinUAE Toolchain arpz Coders. Asm / Hardware 2 26 September 2015 22:33
New 68k gcc toolchain arti Coders. C/C++ 17 31 July 2015 03:59
Hannibal's WinUAE Demo Toolchain 5 Bobic Amiga scene 1 23 July 2015 21:04
From gcc to vbcc. Cowcat Coders. General 9 06 June 2014 14:45

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:20.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.18876 seconds with 14 queries