Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-22 Thread Abdelrazak Younes
-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net] 
Sent: Wednesday, December 21, 2011 9:41 PM
To: cmake@cmake.org
Cc: Abdelrazak Younes
Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

  On Wednesday 21 December 2011, Abdelrazak Younes wrote:
  Hi Alexander,
  
  Just wanted to let you know that, thanks to your assistance, we did some
  more work on this. Please refer to the issue:
  
  http://public.kitware.com/Bug/view.php?id=12614
  
  It would be nice if this work could be integrated in next release of CMake.

 I'll have a look.
 It would be 2.8.8, 2.8.7 is basically done now.

So, as 2.8.8 would be probably in more than 6 months, we'll have to find out 
how to patch installed version of cmake... Or we can switch to the git repo... 
Actually, I just cloned the cmake repo, but I only see the master branch in 
there. If I wanted to maintain our RVDS port, which branch should I track?

Thanks,
Abdel.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-22 Thread Rolf Eike Beer
Am Donnerstag 22 Dezember 2011, 02:23:00 schrieb Abdelrazak Younes:
 -Original Message-
 From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net]
 Sent: Wednesday, December 21, 2011 9:41 PM
 To: cmake@cmake.org
 Cc: Abdelrazak Younes
 Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.
 
   On Wednesday 21 December 2011, Abdelrazak Younes wrote:
   Hi Alexander,
   
   Just wanted to let you know that, thanks to your assistance, we did
   some more work on this. Please refer to the issue:
   
   http://public.kitware.com/Bug/view.php?id=12614
   
   It would be nice if this work could be integrated in next release of
   CMake. 
  I'll have a look.
  It would be 2.8.8, 2.8.7 is basically done now.
 
 So, as 2.8.8 would be probably in more than 6 months, we'll have to find out
 how to patch installed version of cmake... Or we can switch to the git
 repo... Actually, I just cloned the cmake repo, but I only see the master
 branch in there. If I wanted to maintain our RVDS port, which branch should
 I track?

Master is the best idea to use. Any patches that should be merged have to made 
against master, and master is that stuff that will show up in the next stable 
version.

Eike
-- 

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-22 Thread David Cole
On Thu, Dec 22, 2011 at 6:10 AM, Rolf Eike Beer e...@sf-mail.de wrote:
 Am Donnerstag 22 Dezember 2011, 02:23:00 schrieb Abdelrazak Younes:
 -Original Message-
 From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net]
 Sent: Wednesday, December 21, 2011 9:41 PM
 To: cmake@cmake.org
 Cc: Abdelrazak Younes
 Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

   On Wednesday 21 December 2011, Abdelrazak Younes wrote:
   Hi Alexander,
  
   Just wanted to let you know that, thanks to your assistance, we did
   some more work on this. Please refer to the issue:
  
   http://public.kitware.com/Bug/view.php?id=12614
  
   It would be nice if this work could be integrated in next release of
   CMake.
  I'll have a look.
  It would be 2.8.8, 2.8.7 is basically done now.

 So, as 2.8.8 would be probably in more than 6 months, we'll have to find out
 how to patch installed version of cmake... Or we can switch to the git
 repo... Actually, I just cloned the cmake repo, but I only see the master
 branch in there. If I wanted to maintain our RVDS port, which branch should
 I track?

 Master is the best idea to use. Any patches that should be merged have to made
 against master, and master is that stuff that will show up in the next stable
 version.

 Eike
 --

 --

 Powered by www.kitware.com

 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html

 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


Just as an FYI: We will be producing the final CMake 2.8.7 next week,
and we will plan to produce the next one (presumably 2.8.8) at the end
of March, 2012. We have been, on average, releasing CMake every
quarter for the last year and a half now. The future is never firmly
predictable, but we will do our best to stick to a release every 3
months.

Thx,
David
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-22 Thread Abdelrazak Younes
-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
David Cole

On Thu, Dec 22, 2011 at 6:10 AM, Rolf Eike Beer e...@sf-mail.de wrote:
 Am Donnerstag 22 Dezember 2011, 02:23:00 schrieb Abdelrazak Younes:
   It would be nice if this work could be integrated in next release of
   CMake.
  I'll have a look.
  It would be 2.8.8, 2.8.7 is basically done now.

 So, as 2.8.8 would be probably in more than 6 months, we'll have to find out
 how to patch installed version of cmake... Or we can switch to the git
 repo... Actually, I just cloned the cmake repo, but I only see the master
 branch in there. If I wanted to maintain our RVDS port, which branch should
 I track?

 Master is the best idea to use. Any patches that should be merged have to 
 made
 against master, and master is that stuff that will show up in the next stable
 version.

OK, thanks.

 Just as an FYI: We will be producing the final CMake 2.8.7 next week,
 and we will plan to produce the next one (presumably 2.8.8) at the end
 of March, 2012. We have been, on average, releasing CMake every
 quarter for the last year and a half now. The future is never firmly
 predictable, but we will do our best to stick to a release every 3
 months.

Good to know, thanks.
Abdel.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-21 Thread Abdelrazak Younes
Hi Alexander,

Just wanted to let you know that, thanks to your assistance, we did some more 
work on this. Please refer to the issue:

http://public.kitware.com/Bug/view.php?id=12614

It would be nice if this work could be integrated in next release of CMake.

Cheers,
Abdel.


-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net] 
Sent: Thursday, December 08, 2011 9:24 PM
To: cmake@cmake.org
Cc: Abdelrazak Younes
Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

On Thursday 08 December 2011, Abdelrazak Younes wrote:
 Hello,
 
 We (MARVELL Switzerland) have created some CMake support files in order to
 use RVDS 4.1 ARM C/C++ and ASM compilers.

Cool !
I mean, this is really cool ! :-)

Can you please create a ticket for this on 
http://public.kitware.com/Bug/my_view_page.php
, basically with the content of this email ?
This way it is ensured that it won't get lost or forgotten.

Some comments:

Setting all the CMAKE_(C|CXX)_CREATE_* and ARCHIVE variables in the toolchain 
file should not be necessary.

It should be enough to only set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER.
Then cmake tries to compile a small executable with it, and tries to detect 
the compiler, see Modules/CMakeCCompilerID.c.in.
Probably there is a macro builtin into this compiler to detect that it is the 
RVDS compiler ?
The cmake compiler ID could then be named RVDS.

Then cmake executes Modules/CMakeFindBinUtils.cmake.
If the compiler ID has been determined successfully, you can change this file 
so that if the compiler ID is RVDS, it looks for armar instead of ar.

Then, once it has detected this compiler id, it can load 
Modules/Compiler/RVDS-C.cmake and RVDS-CXX.cmake. There you can put also the 
variables for linking etc.


Thanks a lot :-)
Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-21 Thread Alexander Neundorf
On Wednesday 21 December 2011, Abdelrazak Younes wrote:
 Hi Alexander,
 
 Just wanted to let you know that, thanks to your assistance, we did some
 more work on this. Please refer to the issue:
 
 http://public.kitware.com/Bug/view.php?id=12614
 
 It would be nice if this work could be integrated in next release of CMake.

I'll have a look.
It would be 2.8.8, 2.8.7 is basically done now.

Thanks
Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-09 Thread Abdelrazak Younes
Hi Alex,

Thanks for the quick reply.

I am using Outlook so I cannot reply inline easily, please bear with me. I will 
prefix your answer with '#'

-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net] 
Sent: Thursday, December 08, 2011 9:24 PM
To: cmake@cmake.org
Cc: Abdelrazak Younes
Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

On Thursday 08 December 2011, Abdelrazak Younes wrote:
 Hello,
 
 We (MARVELL Switzerland) have created some CMake support files in order to
 use RVDS 4.1 ARM C/C++ and ASM compilers.

# Cool !
# I mean, this is really cool ! :-)

I am very glad that you like it :-)

# Can you please create a ticket for this on 
# http://public.kitware.com/Bug/my_view_page.php
#, basically with the content of this email ?
# This way it is ensured that it won't get lost or forgotten.

Done:

http://public.kitware.com/Bug/view.php?id=12614

# Setting all the CMAKE_(C|CXX)_CREATE_* and ARCHIVE variables in the toolchain 
# file should not be necessary.
# 
# It should be enough to only set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER.
# Then cmake tries to compile a small executable with it, and tries to detect 
# the compiler, see Modules/CMakeCCompilerID.c.in.
# Probably there is a macro builtin into this compiler to detect that it is the 
# RVDS compiler ?

Yes, see here:

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0041c/Babbacdb.html

So I guess I can either use __arm or __ARMCC_VERSION

# The cmake compiler ID could then be named RVDS.
#
# Then cmake executes Modules/CMakeFindBinUtils.cmake.
# If the compiler ID has been determined successfully, you can change this file 
# so that if the compiler ID is RVDS, it looks for armar instead of ar.
#
# Then, once it has detected this compiler id, it can load 
# Modules/Compiler/RVDS-C.cmake and RVDS-CXX.cmake. There you can put also the 
# variables for linking etc.

OK, so shall I make a local copy of Modules/CMakeCCompilerID.c.in and modify 
that? I mean, would this copy take precedence if I add the local Module path 
like this:

  set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../cmake/Modules 
${CMAKE_MODULE_PATH})

# Thanks a lot :-)

And thanks to you for your support.

Cheers,
Abdel.

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-09 Thread Abdelrazak Younes

-Original Message-
From: Abdelrazak Younes 
 # The cmake compiler ID could then be named RVDS.
 #
 # Then cmake executes Modules/CMakeFindBinUtils.cmake.
 # If the compiler ID has been determined successfully, you can change this 
 file 
 # so that if the compiler ID is RVDS, it looks for armar instead of ar.
 #
 # Then, once it has detected this compiler id, it can load 
 # Modules/Compiler/RVDS-C.cmake and RVDS-CXX.cmake. There you can put also 
 the 
 # variables for linking etc.

 OK, so shall I make a local copy of Modules/CMakeCCompilerID.c.in and modify
 that? I mean, would this copy take precedence if I add the local   Module
 path like this:
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../cmake/Modules 
 ${CMAKE_MODULE_PATH})

It doesn't work with the local copy unfortunately... but it works with the 
modified installed version in /usr/share/cmake-2.8/Modules:

cmake ../src -Drvds=1 -Dfirmware=$2 
-DCMAKE_TOOLCHAIN_FILE=../cmake/LinuxRvdsToolchain.cmake
-- The C compiler identification is RVDS
-- The CXX compiler identification is unknown
-- Check for working C compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc
-- Check for working C compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc
-- Check for working CXX compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Compiling for ARM platform
-- The ASM-RVDS compiler identification is unknown
-- Found assembler: /opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armasm
-- Configuring done
-- Generating done
-- Build files have been written to: 

I have used the __ARMCC_VERSION macro (see patch below).

So now I will try to remove CMAKE_(C|CXX)_CREATE_* and ARCHIVE variables and 
modify Modules/CMakeFindBinUtils.cmake; I hope I can use a local copy for this 
file.

Cheers,
Abdel.

--- /usr/share/cmake-2.8/Modules/CMakeCCompilerId.c.in.original 2011-07-08 
14:21:44.0 +0200
+++ /usr/share/cmake-2.8/Modules/CMakeCCompilerId.c.in  2011-12-09 
09:57:49.565830358 +0100
@@ -85,6 +85,9 @@
 #elif defined(__hpux) || defined(__hpua)
 # define COMPILER_ID HP
 
+#elif defined(__ARMCC_VERSION)
+# define COMPILER_ID RVDS
+
 #else /* unknown compiler */
 # define COMPILER_ID  

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-09 Thread Abdelrazak Younes
-Original Message-
From: Abdelrazak Younes 
 So now I will try to remove CMAKE_(C|CXX)_CREATE_* and ARCHIVE variables
 and modify Modules/CMakeFindBinUtils.cmake; I hope I can use a local copy
 for this file.

It seems I can use a local copy of it as I got a warning about that (see 
below). So I modified my local copy with the diff below but it doesn't work, 
/usr/bin/ar is still used. One additional question: armar is apparently doing 
the job of ar and ranlib so I don't want ranlib to be used afterwards so please 
tell me how to avoid that.

Cheers,
Abdel.

The diff:

diff -u /usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake 
../cmake/Modules/CMakeFindBinUtils.cmake 
--- /usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake2011-07-08 
14:21:44.0 +0200
+++ ../cmake/Modules/CMakeFindBinUtils.cmake2011-12-09 10:32:04.049725221 
+0100
@@ -38,8 +38,13 @@
 
   MARK_AS_ADVANCED(CMAKE_LINKER)
 
+ELSEIF(${CMAKE_CXX_COMPILER_ID} MATCHES RVDS
+   OR ${CMAKE_C_COMPILER_ID} MATCHES RVDS)
+
+  FIND_PROGRAM(CMAKE_AR NAMES armar HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+
 # in all other cases search for ar, ranlib, etc.
 ELSE(${CMAKE_CXX_COMPILER_ID} MATCHES MSVC 
 ELSE(${CMAKE_CXX_COMPILER_ID} MATCHES MSVC
OR ${CMAKE_C_COMPILER_ID} MATCHES MSVC
OR ${CMAKE_GENERATOR} MATCHES Visual Studio)
 

The cmake call with the warning:

cmake ../src -Drvds=1 -Dfirmware=$2 
-DCMAKE_TOOLCHAIN_FILE=../cmake/LinuxRvdsToolchain.cmake
-- The C compiler identification is RVDS
-- The CXX compiler identification is unknown
-- Check for working C compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc
-- Check for working C compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc
-- Check for working CXX compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Compiling for ARM platform
-- The ASM-RVDS compiler identification is unknown
CMake Warning (dev) at 
/usr/share/cmake-2.8/Modules/CMakeDetermineASMCompiler.cmake:156 (INCLUDE):
  File /usr/share/cmake-2.8/Modules/CMakeDetermineASMCompiler.cmake includes
  /src/../cmake/Modules/CMakeFindBinUtils.cmake
  (found via CMAKE_MODULE_PATH) which shadows
  /usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake.  This may cause
  errors later on .

  Policy CMP0017 is not set: Prefer files from the CMake module directory
  when including from there.  Run cmake --help-policy CMP0017 for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
Call Stack (most recent call first):
  /cmake/Modules/CMakeDetermineASM-RVDSCompiler.cmake:3 (INCLUDE)
  /CMakeLists.txt:5 (enable_language)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found assembler: /opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armasm
-- Configuring done
-- Generating done
-- Build files have been written to: xxx

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-08 Thread Alexander Neundorf
On Thursday 08 December 2011, Abdelrazak Younes wrote:
 Hello,
 
 We (MARVELL Switzerland) have created some CMake support files in order to
 use RVDS 4.1 ARM C/C++ and ASM compilers.

Cool !
I mean, this is really cool ! :-)

Can you please create a ticket for this on 
http://public.kitware.com/Bug/my_view_page.php
, basically with the content of this email ?
This way it is ensured that it won't get lost or forgotten.

Some comments:

Setting all the CMAKE_(C|CXX)_CREATE_* and ARCHIVE variables in the toolchain 
file should not be necessary.

It should be enough to only set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER.
Then cmake tries to compile a small executable with it, and tries to detect 
the compiler, see Modules/CMakeCCompilerID.c.in.
Probably there is a macro builtin into this compiler to detect that it is the 
RVDS compiler ?
The cmake compiler ID could then be named RVDS.

Then cmake executes Modules/CMakeFindBinUtils.cmake.
If the compiler ID has been determined successfully, you can change this file 
so that if the compiler ID is RVDS, it looks for armar instead of ar.

Then, once it has detected this compiler id, it can load 
Modules/Compiler/RVDS-C.cmake and RVDS-CXX.cmake. There you can put also the 
variables for linking etc.


Thanks a lot :-)
Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake